ID:170977
Nov 24 2004, 11:08 pm
|
|
Okay, I want to make it so, you get to type something in. Lets say you type x in. It checks to see if "y" is in the text string. If not, it adds it to the front of the string; "yx". Anyone know how to do this?
|
In response to Foomer
|
|
But then x+y would make y be after it, right?
|
In response to FireEmblem
|
|
Then do y+=x... :o
|
In response to FireEmblem
|
|
FireEmblem wrote:
But then x+y would make y be after it, right? Yes, it would, so just do x="[y][x]" On a side note, I wouldn't name a var "y" or "x" just because of the location/coordinate variables, x,y, and z. Even if code doesn't interfeere with those, it can get confusing if you name variables after pre-existing variables. |
In response to Hell Ramen
|
|
Hell Ramen wrote:
Then do y+=x... :o That would work, yes, but he wants to put "[y]" in front of "[x]", not "[x]" in front of "[y]". Basically the difference is, in your way, he would end up with y, but he wants to end up with x. |
In response to Wizkidd0123
|
|
Ooh... :o
|
<code>var/x = "x" var/y = "y" if(!findtext(x, y)) x += y</code>
?