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:
parent
3183d5a403
commit
bcf47bc67c
16 changed files with 129 additions and 107 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue