- Joined
- Aug 15, 2007
- Messages
- 37
How do you write multiple if conditions in JASS?
EX: if (thisIsTrue and thisIsTrue2) then
call DoSomething
endif
EX: if (thisIsTrue and thisIsTrue2) then
call DoSomething
endif
function Conditions takes nothing returns boolean
local unit u = GetTriggerUnit()
if (IsUnitType(u, UNIT_TYPE_HERO) and IsUnitEnemy(u, Player(0)) and IsUnitAlly(u, Player(1)).......) then
call DoSomething
endif
set u = null
endfunction
NOTE: They're not functions, they're just... erm, keywords? They're kind've in the same category as 'if' and such. (they're not functions, not variables, parsed by the language, etc, etc)
HappyTauren said:well, all jass scripting programs highlight them same way as if,loop,function,struct etc.
PurplePoot said:NOTE: They're not functions, they're just... erm, keywords? They're kind've in the same category as 'if' and such. (they're not functions, not variables, parsed by the language, etc, etc)
native And takes boolexpr operandA, boolexpr operandB returns boolexpr
native Or takes boolexpr operandA, boolexpr operandB returns boolexpr
native Not takes boolexpr operand returns boolexpr