Here's the issue.
I am porting many scripts I have written elsewhere into Kitely.
I ran into a problem with detecting when the avatar stands up.
Code: Select all
key sittingID = llAvatarOnSitTarget();
llOwnerSay("sittingID " + (string) sittingID);
if ((string) sittingID == NULL_KEY) {
llOwnerSay("Is null key");
if (sittingID) {
llOwnerSay("id did not read as false");
}
if (sittingID) {
llOwnerSay("normal check for no avatar sitting");
}
if ((key)NULL_KEY) {
llOwnerSay("weird check is still true.");
}
}
[19:08] object: sittingID 00000000-0000-0000-0000-000000000000
[19:08] object: Is null key
[19:08] object: id did not read as false
[19:08] object: normal check for no avatar sitting. THis should have been false
[19:08] object: weird check is still true.
The first line of output is expected for an avatar that just stood up. There is not avataronsit
The next line of out put is captured by my kluged test. Almost all other scripts just use if(av) expecting the 00000 thing to calculate as false.
But, when I do that standard if check it doesn't work. It still evaluates as true.
I then tried casting the NULL_KEY to key and found it also does not evaluate as false.
This is a new world in Kitely. Is there an owner setting that effects how NULL_KEY is evaluated?
I'm sure I am doing something extremely silly in the code.
I missed a turn and have entered into the Twilight Zone. Any clues would be appreciated.