hedgewars/uScript.pas
changeset 7010 10a0a31804f3
parent 6982 8d41d22a291d
child 7030 09984acadece
--- a/hedgewars/uScript.pas	Wed May 02 19:16:12 2012 -0400
+++ b/hedgewars/uScript.pas	Thu May 03 00:20:58 2012 -0400
@@ -1103,7 +1103,7 @@
     else begin
         gear := GearByUID(lua_tointeger(L, 1));
         if (gear <> nil) and (gear^.Hedgehog <> nil) then
-            gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_toboolean(L, 3);
+            gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3);
     end;
     lc_seteffect := 0;
 end;
@@ -1118,9 +1118,9 @@
         begin
         gear:= GearByUID(lua_tointeger(L, 1));
         if (gear <> nil) and (gear^.Hedgehog <> nil) then
-            lua_pushboolean(L, gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))])
+            lua_pushinteger(L, gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))])
         else
-            lua_pushboolean(L, false)
+            lua_pushinteger(L, 0)
         end;
     lc_geteffect:= 1
 end;