# HG changeset patch # User nemo # Date 1317086980 14400 # Node ID d681b81275232c4205ce12e357d835f2ddcc7ed3 # Parent 728ce9acbaf72f0a8d559dd883f00f7a43f8ff6f this needs to actually return something diff -r 728ce9acbaf7 -r d681b8127523 hedgewars/uScript.pas --- 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;