Would love to see the loadstring() lua function, would open up huge ways to execute dynamic.
https://www.lua.org/pil/8.html
You just have to use load(). It does the same exact thing.
local f = assert(load("return true"))
print(f())
2 Likes
Wow didn’t even know about that. thanks!
loadstring
has been deprecated since Lua 5.2 and removed in Lua 5.3. Use load
instead: https://www.lua.org/manual/5.3/manual.html#pdf-load
1 Like