Hi

that never worked well on Xengine, because keys cast to strings. ( ie are strings internally)

so kind unpredictable


do explicit compare with NULL_KEY

if(agent != NULL_KEY)

original it will work fine with YEngine, but guess not the best time for oscc to test YEngine :)

Ubit

On 06-Nov-19 00:51, Frans wrote:
Hi,
We have upgraded the OSCC grid to version 0.9.1.0, and I noticed a change
in script behavior.
in the past, in version 0.8.2.1 for example, NULL_KEY
or 00000000-0000-0000-0000-000000000000 would evaluate as FALSE when put in
a IF statement.
In the latest version it evaluates as TRUE.

Is this the intended behavior?

Example Script:

default
{
state_entry()
{
llSitTarget(<0,0,0.5>, ZERO_ROTATION );
}
changed(integer change)
{
if(change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
llOwnerSay((string)agent);
if(agent)
{
llInstantMessage(llAvatarOnSitTarget(), "test");
}
}
}
}

Regards,
_______________________________________________
Opensim-dev mailing list
Opensim-dev@opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev

Reply via email to