hedgewars/uScript.pas
changeset 6046 d681b8127523
parent 6019 8843ea756cfc
child 6088 47d1b04003d1
equal deleted inserted replaced
6044:728ce9acbaf7 6046:d681b8127523
   955             if ammo^.AmmoType = amNothing then lua_pushinteger(L, 0)
   955             if ammo^.AmmoType = amNothing then lua_pushinteger(L, 0)
   956             else lua_pushinteger(L, ammo^.Count)
   956             else lua_pushinteger(L, ammo^.Count)
   957             end
   957             end
   958         else lua_pushinteger(L, 0)
   958         else lua_pushinteger(L, 0)
   959         end
   959         end
   960     else LuaError('Lua: Wrong number of parameters passed to GetAmmoCount!');
   960     else 
   961     lc_getammocount:= 0
   961         begin
       
   962         LuaError('Lua: Wrong number of parameters passed to GetAmmoCount!');
       
   963         lua_pushnil(L)
       
   964         end;
       
   965     lc_getammocount:= 1
   962 end;
   966 end;
   963 
   967 
   964 function lc_sethealth(L : Plua_State) : LongInt; Cdecl;
   968 function lc_sethealth(L : Plua_State) : LongInt; Cdecl;
   965 var gear : PGear;
   969 var gear : PGear;
   966 begin
   970 begin