hedgewars/uScript.pas
changeset 5529 9a47cff3910a
parent 5527 418741abd209
child 5547 2fe1d68a102c
child 5548 73f2fec65257
--- a/hedgewars/uScript.pas	Mon Aug 08 23:57:04 2011 -0400
+++ b/hedgewars/uScript.pas	Tue Aug 09 21:18:12 2011 -0400
@@ -861,11 +861,13 @@
                vgear^.Hedgehog:= gear^.Hedgehog;
                vgear^.FrameTicks:= lua_tointeger(L, 3);
                if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1;
-               end;
+               lua_pushinteger(L, vgear^.Uid)
+               end
             end
+            else lua_pushnil(L)
         end
     else LuaError('Lua: Wrong number of parameters passed to HogSay!');
-    lc_hogsay:= 0
+    lc_hogsay:= 1
 end;
 
 function lc_switchhog(L : Plua_State) : LongInt; Cdecl;