注册 登录
编程论坛 Lua论坛

lua dump到文件后,如何能看到function的所有代码

spyshadow 发布于 2020-01-15 01:35, 2347 次点击
function a()
sss="abcdefg"
return sss
end
showfun = string.dump(a)

local outfile = io.open("funinfo.txt", "w")
local outnum = outfile:write(showfun)
outfile:close()

通过这种办法可以把这个a的函数保存在文件中,结果是乱码
我就想要看看function是怎么内的代码是什么,这个怎么搞
0 回复
1