| 30 | |
| 31 | |
| 32 | const 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 | |
| 43 | int Script::Error(lua_State *pState) { |
| 44 | SCRIPT_BEGIN(pState) |
nothing calls this directly
no outgoing calls
no test coverage detected