1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-10 19:32:10 +00:00

Improve Script CPP API diagnostics

This commit is contained in:
kwolekr 2015-08-05 00:49:35 -04:00
parent 3183d5a403
commit bcf47bc67c
16 changed files with 129 additions and 107 deletions

View file

@ -81,8 +81,7 @@ s16 ScriptApiPlayer::on_player_hpchange(ServerActiveObject *player,
objectrefGetOrCreate(L, player);
lua_pushnumber(L, hp_change);
if (lua_pcall(L, 2, 1, m_errorhandler))
scriptError();
PCALL_RES(lua_pcall(L, 2, 1, m_errorhandler));
hp_change = lua_tointeger(L, -1);
lua_pop(L, -1);
return hp_change;