Give lua a simple means for NULL_KEY evaluating as false
planned
WolfGang Senizen
LSL
key sitter = llAvatarOnSitTarget( );
if(sitter) {
// Do stuff
}
This is probably one of the most used "hack" / "hidden features" of lsl.
Would be amazing if lua could have it too
Lua
Maybe something like this
local sitter = ll.AvatarOnSitTarget()
if sitter.isValid() then
-- Do stuff
end
Log In
Signal Linden
planned
Good point! We're adding a
uuid_val.istruthy
(all lowercase is convention in Lua builtins, apparently) to mimic what LSL would do in the if (uuid) {...} case. We're also going to start setting our UUID constants like NULL_KEY
as actual uuid
instances to make it less annoying to compare them.