--- 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