Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

String Manipulation?

Eubey Cork
Registered User
Join date: 25 Apr 2006
Posts: 5
05-04-2006 19:01
Ok, so I am trying to have the user input commands to an object, the command being light set_blue # (# being an int)...
I am using the following code
CODE

if(llGetSubString(message,0,14) == "light set_blue" )
{
string blue=llGetSubString(message,15,llStringLength(message));
llSay(0,"Len:"+(string)llStringLength(message));
llSay(0,"Blue:"+blue);
llMessageLinked(LINK_SET, (integer)blue, "blue", NULL_KEY);
}


when i type in "light set_blue" it says:
Len: 14
Blue: light set_blue

when i type in "light set_blue 1" it says nothing... any ideas?

dont ask why there is a weird space between the message thing, i dont know the php bb tag is doing it
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
05-04-2006 19:29
You need to change the last llGetSubString argument to 13. 0 to 13 makes 14 characters.

Try this link:

http://secondlife.com/badgeo/wakka.php?wakka=llGetSubString