Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llToLower problem

Webmite Edelbrock
Registered User
Join date: 21 Feb 2005
Posts: 4
07-27-2008 03:46
hello, i have a little problem. i tried to use llToLower, it compiles but when i check it out using caps the script does nothing, lowercase it works just fine. does anybody have an idea why?
thank you

default
{
state_entry()
{
llMessageLinked(LINK_ALL_OTHERS, -85856985, "", NULL_KEY);
llTargetOmega(<0,0,0.0>,PI,1.0);
key id = llGetOwner();
llListen(4,"",id,"die";);
}

listen(integer channel,string name,key id,string message)
{
message = llToLower(message);
if (message == "die";)
{
llDie();
}
}

touch_start(integer num)
{
if (llDetectedKey(0) == llGetOwner())
{
state on;
}
}
}

state on
{
state_entry()
{
llMessageLinked(LINK_ALL_OTHERS, -98569854, "", NULL_KEY);
llTargetOmega(<0,0,0.25>,PI,1.0);
}

touch_start(integer num)
{
if (llDetectedKey(0) == llGetOwner())
{
state default;
}
}
}
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
07-27-2008 04:46
In your listen statement you are filtering for 'die' in lower case so any other string will be ignored.

try this instead llListen(4,"",id,"";);
Webmite Edelbrock
Registered User
Join date: 21 Feb 2005
Posts: 4
07-27-2008 05:14
oh thank you. i'm so bad at this stuff. removing that worked perfect.