Loadstring function replacement in latest version
Asked Answered
A

1

21

I updated from lua 5.1 to 5.3.2 , One of my scripts didn't work cause of attempt to call a nil value (global 'loadstring') So, did they replace it with a new function?

There you can find the function https://www.lua.org/pil/8.html
There you can test it ( won't work) http://www.lua.org/cgi-bin/demo

Adamek answered 5/6, 2016 at 11:9 Comment(1)
Step through the versions of the Reference Manual, reading the "Incompatibilities with the Previous Version" section.Terrorstricken
P
30

Since Lua 5.2, loadstring has been replaced by load.

From Lua 5.2 reference manual:

Function loadstring is deprecated. Use load instead; it now accepts string arguments and are exactly equivalent to loadstring.

Pfaff answered 5/6, 2016 at 11:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.