
03-20-2008, 12:17 AM
|
|
The Cat
|
 |
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
|
|
|
Not sure what you're asking.
If you only want it to display the first 15 characters then you can do: params[1].substring(0, 15)
if you want to cut off the first 15 characters you can do: params[1].substring(15)
If you want to cut off all the characters before "15" you can do:
params[1].substring(params[1].pos(15))
Also you should use == for comparison. Using one = is for declaration.
if (player.rupees == params[1].substring(15)) { for example.
If you just need to parse a string you could do:
params = obj.text.tokenize();
then use params[0] for the first space. You can define which character to parse like this:
params = obj.text.tokenize("a");
if obj.text = "123abc123abc";
params[0] would = 123
params[1] would = bc123
and so on. |
__________________
“Shoot for the moon. Even if you miss, you'll land among the stars.”
|
|
|
|