hedgewars/uScript.pas
changeset 14289 a3531b520efb
parent 14288 9548edd9ebcf
child 14293 21e719e35f43
--- a/hedgewars/uScript.pas	Fri Nov 23 16:03:10 2018 -0500
+++ b/hedgewars/uScript.pas	Fri Nov 23 16:20:55 2018 -0500
@@ -2677,6 +2677,7 @@
     call = 'GetAmmo';
     params = 'ammoType';
 begin
+	lc_getammo:= 0
     if CheckLuaParamCount(L, 1, call, params) then
         begin
         at:= LuaToAmmoTypeOrd(L, 1, call, params);
@@ -2700,8 +2701,6 @@
             lua_pushnumber(L, Ammoz[TAmmoType(at)].NumberInCase);
             lc_getammo:= 4
             end
-        else
-            lc_getammo:= 0
         end;
 end;