PANIC: unprotected error in call to Lua API (unable to get ModuleFileName)

如何将Lua文本文件转化为Lua块文件（chunk file）

调用LuaAPI – lua_dump

关于lua_dump: about lua_dump: Dumps a function as a binary chunk. Receives a Lua function on the top of the stack and produces a binary chunk that, if loaded again, results in a function equivalent to the one dumped. As it produces parts of the chunk, lua_dump calls function writer (see lua_Writer) with the given data to write them.