a="world" local newtable={} setmetatable(newtable, {_index=_G}) setfenv(1,newtable) b="hello" print(b) print(a)
................ 以上这段代码,为啥会报错呢?错误如下: lua: noglobal.lua:6: attempt to call global 'print' (a nil value)
收起
http://www.jb51.net/article/55161.htm
报告相同问题?