LSL-SLua: assignments as expressions do not always work
in progress
Frio Belmonte
default {
state_entry() {
integer a = 7;
integer b = a = 3;
llOwnerSay((string)b);
}
}
This works correctly under LSL-Mono and prints 3. Under LSL-SLua it gives an "unable to cast!" runtime error. Interestingly, doing "b = (a = 3)" works correctly under both VMs.
The same applies for all other assignments as expressions as well (+=, -=, *=, /=, %=).
Log In
H
Harold Linden
marked this post as
in progress
Thanks for the report!
This is in essence the same bug as the mul assign bug you reported, we were using the wrong mechanism for determining if we want to do anything with the result of an expression.
Should be fixed by https://github.com/secondlife/slua/commit/7555e10b2831874a0535494d313c7c91b6a95934 once it gets deployed with a sim update.