hedgewars/uScript.pas
changeset 7339 5984b749ad9b
parent 7337 c224cd2d32f3
child 7374 514138949c76
child 7401 4c3ec3dca0c7
--- a/hedgewars/uScript.pas	Wed Jul 04 10:56:42 2012 -0400
+++ b/hedgewars/uScript.pas	Wed Jul 04 12:41:47 2012 -0400
@@ -341,7 +341,7 @@
         end
     else
         begin
-        if (lua_gettop(L) <> 3) then 
+        if (lua_gettop(L) = 3) then 
              gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), 0)
         else gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), lua_tointeger(L, 4));
         if gear <> nil then
@@ -362,7 +362,7 @@
         end
     else
         begin
-        if (lua_gettop(L) <> 3) then
+        if (lua_gettop(L) = 3) then
              gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), UtilityCrate, lua_tointeger(L, 3), 0)
         else gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), UtilityCrate, lua_tointeger(L, 3), lua_tointeger(L, 4));
         if gear <> nil then