hedgewars/uScript.pas
branchhedgeroid
changeset 5548 73f2fec65257
parent 5530 25d4118056e1
parent 5529 9a47cff3910a
child 5577 272c82f82cee
--- a/hedgewars/uScript.pas	Thu Aug 11 15:01:05 2011 +0200
+++ b/hedgewars/uScript.pas	Thu Aug 11 15:03:21 2011 +0200
@@ -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;