• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

or conditional?

Status
Not open for further replies.
Level 12
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'

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
 
Status
Not open for further replies.
Top