Pass a errfunc to lua_pcall to get a traceback

This commit is contained in:
ShadowNinja
2013-11-05 12:06:15 -05:00
parent 3f519eb729
commit 371b39a09a
19 changed files with 424 additions and 324 deletions

View File

@@ -66,7 +66,7 @@ int ModApiRollback::l_rollback_revert_actions_by(lua_State *L)
lua_pushvalue(L, table);
lua_pushstring(L, i->c_str());
if(lua_pcall(L, 2, 0, 0))
script_error(L, "error: %s", lua_tostring(L, -1));
script_error(L);
}
lua_remove(L, -2); // Remove table
lua_remove(L, -2); // Remove insert