Undocumented LSL print() function works differently under LSL 2025 VM
expected
Tapple Gao
Run this script under mono vm, nothing happens:
default {state_entry() {
print(["lol"]);
}}
But, run it under LSL2025 vm:
[6:41 AM] Object: table: 0x000000000fd76ec0
It seems to be hooked up to the luau print function by mistake, rather than what it's supposed to do
Found with help from Suzanna and WolfGang: https://github.com/secondlife/lsl-definitions/pull/120#discussion_r3212631730
Log In
H
Harold Linden
updated the status to
expected
print()
is expected to be there, it has always existed in LSL but was never particularly useful, but it has always existed in Lua.The LSL form is slightly different in that it's not really a function, it's a special form of expression that compiles down to a function call, but we may as well just call it a function.
H
Harold Linden
Yes this is actually intentional.
print()
existed but was quite useless other than spamming stderr
on the server. Now it does something useful :)SuzannaLinn Resident
I think that it's intended, to give a use to the unuseful LSL
print
.It has the advantage that it doesn't need typecasting.