You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
L.DoFile does not work when i require a so in lua script #439
I have a lua script a.lua, and in this file I required a Lua so module:
pb = require "pb"
print(pb)
and the pb module is a lua so in the same dir with a.lua
but, when the Golang code below not work
L := lua.NewState()
defer L.Close()
if err := L.DoFile("a.lua"); err != nil {
panic(err)
}
error message:
panic: <string>:1: module pb not found:
no field package.preload['pb']
stat ./pb.lua: no such file or directory
stat /usr/local/share/lua/5.1/pb.lua: no such file or directory
stat /usr/local/share/lua/5.1/pb/init.lua: no such file or directory,
Reactions are currently unavailable
Activity
Repository owner locked and limited conversation to collaborators on Jun 18, 2023
Activity