author | nemo |
Mon, 26 Sep 2011 21:29:40 -0400 | |
changeset 6046 | d681b8127523 |
parent 6044 | 728ce9acbaf7 |
child 6048 | ae213ef7030a |
--- a/hedgewars/uScript.pas Tue Sep 27 00:46:15 2011 +0200 +++ b/hedgewars/uScript.pas Mon Sep 26 21:29:40 2011 -0400 @@ -957,8 +957,12 @@ end else lua_pushinteger(L, 0) end - else LuaError('Lua: Wrong number of parameters passed to GetAmmoCount!'); - lc_getammocount:= 0 + else + begin + LuaError('Lua: Wrong number of parameters passed to GetAmmoCount!'); + lua_pushnil(L) + end; + lc_getammocount:= 1 end; function lc_sethealth(L : Plua_State) : LongInt; Cdecl;