- Joined
- Dec 2, 2016
- Messages
- 733
In zinc the or operator is || but does jass not recognize it?
I'm pretty sure my script is erroring because of the 'or'
I'm pretty sure my script is erroring because of the 'or'
JASS:
function killHuman takes nothing returns nothing
if (GetUnitTypeId(GetEnumUnit()) == 'h010' or GetUnitTypeId(GetEnumUnit()) == 'h00V' and (GetOwningPlayer(GetEnumUnit() == GetTriggerPlayer())))
call KillUnit(GetEnumUnit())
endif
endfunction
private function DoKick takes player pK returns nothing
local integer p = GetPlayerId(pK)
if GetLocalPlayer() == pK then
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 3600, "|cffff0000You have been removed from the game.|r")
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function killHuman)
endif
endfunction