diff --git a/pkg.go b/pkg.go index c0dc9b0..c002e76 100644 --- a/pkg.go +++ b/pkg.go @@ -19,12 +19,12 @@ func NewLUA() (lua LUA) { return } -func (l *LUA) SetStructInLUA(L *gopherLua.LState, varname string, strct any) (ltable gopherLua.LValue, err error) { +func (l *LUA) SetStructInLUA(varname string, strct any) (ltable gopherLua.LValue, err error) { // JSON is used as a communications layer. j, _ := json.Marshal(strct) // JSON is decoded to a Lua table. - ltable, err = luaJSON.Decode(L, j) + ltable, err = luaJSON.Decode(l.state, j) if err != nil { return }