tovector(nil), toquaternion(nil), and touuid(nil) should return nil
complete
Tapple Gao
tovector(nil)
, toquaternion(nil)
, and touuid(nil)
should return nil
, just like tonumber(nil)
:> tonumber(nil)
nil
> tovector(nil)
stdin:1: unable to cast!
stack backtrace:
[C] function tovector
stdin:1
> toquaternion(nil)
stdin:1: unable to cast!
stack backtrace:
[C] function toquaternion
stdin:1
> touuid(nil)
stdin:1: invalid argument #1 to 'touuid' (string expected, got nil)
stack backtrace:
[C] function touuid
stdin:1
Log In
H
Harold Linden
marked this post as
complete
This is now fixed on the beta grid, thanks again!
H
Harold Linden
marked this post as
inĀ progress
Should be fixed once https://github.com/secondlife/slua/commit/d7a3bb4d2d76f18f7436b09b282d9deef4c17a51 is pushed with the next sim update
H
Harold Linden
marked this post as
planned
Thanks for the report! Agreed, they should just return
nil
for any case they can't convert.Tapple Gao
Harold Linden Were you planning to do this? in the commit, it looks like you just tested for nil:
> tonumber(ZERO_VECTOR)
nil
> touuid(ZERO_VECTOR)
stdin:1: invalid argument #1 to 'touuid' (string expected, got vector)
stack backtrace:
[C] function touuid
stdin:1
> tonumber({})
nil
> tovector({})
stdin:1: unable to cast!
stack backtrace:
[C] function tovector
stdin:1
> touuid({})
stdin:1: invalid argument #1 to 'touuid' (string expected, got table)
stack backtrace:
[C] function touuid
stdin:1