Okay, so I'm trying to make a Portal remake into wc3, well, not a remake, but general idea of portal into like, a PvP game, or something. Anyway. I was working on the creation of the portals. And for what ever reason, JASSHelper is saying I have 4 errors. I don't get why these are syntax erros.
Anyway here's the code. Errors are comments. There's a second trigger almost the exactly the same, except instead of "PortsYellow" its "PortsBlue" and instead of "PYY"/"PYX" its "PBY"/"PBX". also the unit id, PY00 is PB00 in the 2nd trigger.
Now, I know I'm kinda stupid when it comes to JASS, for an example, I have RemoveUnit, when there is no unit to start with. So I have no idea what it does when there's no unit in the first place.
Edit: I forgot to add this. I have all the globals in the map specific custom script. They are
Anyway here's the code. Errors are comments. There's a second trigger almost the exactly the same, except instead of "PortsYellow" its "PortsBlue" and instead of "PYY"/"PYX" its "PBY"/"PBX". also the unit id, PY00 is PB00 in the 2nd trigger.
JASS:
function PY_Actions takes nothing returns nothing
set P = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
//RemoveUnit(PortsYellow[P])
set PortsYellow[P] = null
set CX[P] = GetUnitX(GetTriggerUnit())
set CY[P] = GetUnitY(GetTriggerUnit())
set PYY[P] = GetSpellTargetY()
set PYX[P] = GetSpellTargetX()
//CreateUnitAtLoc(P, PY00, (GetLocationY(PYY[P]) + GetLocationX(PYX[P])), (GetLocationX(PYX[P]) + GetLocationY(PYY[P])))
set PortsYellow[P] = GetLastCreatedUnit()
endfunction
//===========================================================================
function Init_PY takes nothing returns nothing
set PY = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( PY, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( PY, function PY_Actions )
endfunction
Now, I know I'm kinda stupid when it comes to JASS, for an example, I have RemoveUnit, when there is no unit to start with. So I have no idea what it does when there's no unit in the first place.
Edit: I forgot to add this. I have all the globals in the map specific custom script. They are