Lars Dragunov Posted July 14, 2012 Share Posted July 14, 2012 Me salta este problema y no tengo idea de por que me salga [2012-07-14 13:34:46] SCRIPT ERROR: factions\SFPD.lua:16: function arguments expected near 'if' [2012-07-14 13:34:46] WARNING: Loading script failed: factions\SFPD.lua:16: function arguments expected near 'if' Aqui les dejo el codigo completo del Script gates = {} cols = {} gates[1] = createObject(1495, 239.5, 116.099609375, 1002.200012207, 0, 0, 90) gates[2] = createObject(1495, 239.5, 119.099609375, 1002.200012207, 0, 0, 270) cols[1] = createColCircle ( 239.5, 116.099609375, 1002.200012207, 2 ) setElementInterior ( gate[1], 10) setElementInterior ( gate[2], 10) setElementInterior ( cols[1], 10) function moveGate(thePlayer) if source == cols[1] then isPlayerInFaction = exports.factions:isPlayerInFaction if isPlayerInFaction(source, 1) then moveObject (gates[1], 2000, 253.19921875, 107.599609375, 1002.200012207 ) moveObject (gates[2], 2000, 253.19921875, 110.599609375, 1002.200012207 ) end end end addEventHandler( "onColShapeHit", getRootElement(), openGates ) function closeGates(thePlayer) if source == cols[1] then isPlayerInFaction = exports.factions:isPlayerInFaction if isPlayerInFaction(source, 1) then moveObject (gates[1], 5000, 239.5, 116.099609375, 1002.200012207 ) moveObject (gates[2], 5000, 239.5, 119.099609375, 1002.200012207 ) end end end addEventHandler( "onColShapeLeave", getRootElement(), closeGates ) AYUDA Link to comment
JuanM27 Posted July 15, 2012 Share Posted July 15, 2012 si no me equivoco es por esto. vos tenes la function con thePlayer function moveGate(thePlayer) pero en la linea 16 tenes source if isPlayerInFaction(source, 1) then proba cambiando el source por thePlayer if isPlayerInFaction(thePlayer, 1) then Link to comment
Castillo Posted July 15, 2012 Share Posted July 15, 2012 Eso no tiene nada quever, ademas el problema ya esta resuelto aca: viewtopic.php?f=91&t=45403 Link to comment
Recommended Posts