some changes with data field, and fix smth

This commit is contained in:
2025-08-10 16:26:41 +03:00
parent 20a1e3e7bb
commit c6da55ad65
8 changed files with 69 additions and 90 deletions

View File

@@ -200,7 +200,7 @@ func (h *HandlerV1) handleLUA(sid string, r *http.Request, req *rpc.RPCRequest,
} else {
L.SetField(scriptDataTable, "result", res)
}
__exit = 0
L.RaiseError("__successfull")
return 0
@@ -584,8 +584,7 @@ func (h *HandlerV1) handleLUA(sid string, r *http.Request, req *rpc.RPCRequest,
if err != nil && __exit != 0 && __exit != 1 {
llog.Error("script error", slog.String("script", path), slog.String("error", err.Error()))
return rpc.NewError(rpc.ErrInternalError, rpc.ErrInternalErrorS, nil, req.ID)
}
}
pkg := L.GetGlobal("package")
pkgTbl, ok := pkg.(*lua.LTable)

View File

@@ -41,7 +41,7 @@ func ConvertLuaTypesToGolang(value lua.LValue) any {
}
isNumeric = true
}
num, err := strconv.Atoi(numKey.String())
if err != nil {
isArray = false