3 ms·
For those who don't know Lua very well (like me), here is a link to the reference manual. https://www.lua.org/manual/5.4/manual.html#pdf-load https://www.lua.o
by aeonik 2y ago
For those who don't know Lua very well (like me), here is a link to the reference manual.
https://www.lua.org/manual/5.4/manual.html#pdf-load https://www.lua.org/manual/5.4/manual.html#pdf-load
A simple example that I tested:
local chunk = "return 2 + 2"
local func = load(chunk)
print(func()) -- Output: 4
- CapsAdmin 2y agoloadstring lwas replaced with load, and dostring was removed, but it's basically just assert(loadstring(code))(...) load is the replacement. i assume the grandparent meant dostring and not eval?