局部变量不能直接访问,需要用debug.getlocal,比如这里访问foo函数的局部变量:. lua_debug> print(debug.getlocal(4,1)) var2 10. 这里getlocal的第一个参数为帧数, ...
確定! 回上一頁