最新版本的Loadstring函数替换 [英] Loadstring function replacement in latest version
问题描述
我从lua 5.1更新到5.3.2,我的一个脚本不起作用是attempt to call a nil value (global 'loadstring')
的原因,所以,他们是否将其替换为新功能?
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?
您可以在其中找到函数 https://www.lua.org/pil/8. html
您可以在此处进行测试(无法使用) http://www.lua.org/cgi- bin/demo
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
推荐答案
Since Lua 5.2, loadstring
has been replaced by load
.
摘自 Lua 5.2参考手册:
不推荐使用功能
loadstring
.使用load
代替;现在它接受字符串参数,并且完全等同于loadstring
.
Function
loadstring
is deprecated. Useload
instead; it now accepts string arguments and are exactly equivalent toloadstring
.
这篇关于最新版本的Loadstring函数替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!