Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loadstring function replacement in latest version

Tags:

lua

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

like image 961
Slavi Avatar asked Jun 05 '16 11:06

Slavi


1 Answers

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.

like image 53
Yu Hao Avatar answered Oct 19 '22 21:10

Yu Hao