MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / LastError

Method LastError

MonaServer/sources/Script.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32const char* Script::LastError(lua_State *pState) {
33 int top = lua_gettop(pState);
34 if (top == 0)
35 return "Unknown error";
36 const char* error = lua_tostring(pState, -1);
37 lua_pop(pState, 1);
38 if (!error)
39 return "Unknown error";
40 return error;
41}
42
43int Script::Error(lua_State *pState) {
44 SCRIPT_BEGIN(pState)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected