# HG changeset patch # User smxx # Date 1265822110 0 # Node ID c9c830897547b96da09f8a1730fc1832a7c1c00a # Parent befd3808c63a7b31903cdb6b155111855302dd8d Engine: * Last pointer cast removed (I hope) diff -r befd3808c63a -r c9c830897547 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Wed Feb 10 17:13:49 2010 +0000 +++ b/hedgewars/uScript.pas Wed Feb 10 17:15:10 2010 +0000 @@ -185,7 +185,10 @@ function lc_addteam(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 5 then - WriteLnToConsole('LUA: Wrong number of parameters passed to AddTeam!') + begin + WriteLnToConsole('LUA: Wrong number of parameters passed to AddTeam!'); + //lua_pushnil(L) + end else begin ParseCommand('addteam ' + lua_tostring(L, 2) + ' ' + lua_tostring(L, 1), true); @@ -193,9 +196,10 @@ ParseCommand('fort ' + lua_tostring(L, 4), true); ParseCommand('voicepack ' + lua_tostring(L, 5), true); CurrentTeam^.Binds:= DefaultBinds; - lua_pushinteger(L, LongInt(CurrentTeam)); + // fails on x64 + //lua_pushinteger(L, LongInt(CurrentTeam)); end; - lc_addteam:= 1; + lc_addteam:= 0;//1; end; function lc_addhog(L : Plua_State) : LongInt; Cdecl;