mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Improve Script CPP API diagnostics
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user