"And" "or" conditionals?

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
JASS:
return this and that and the_other_thing

JASS:
return this or that or the_other_thing
 

Romek

Super Moderator
Reaction score
963
JASS:
// Integer/real only:
> // Greater than
< // Less than
>= // Greater than, or equal to
<= // Less than, or equal to

// All:
== // Equal to
!= // Not equal to

if (A) or (B) then
// blah
elseif (C) and (D) then
// blah
else
// blah
endif

// Example:
if someInt > 5 or someReal == bj_PI then
 call KillUnit(u)
elseif someString == "Hello" and not SomeBoolean == not (true == false) then
 call SetUnitX(u, 0)
endif


'or' is evaluated before 'and'.
 

Romek

Super Moderator
Reaction score
963
Exactly what I typed wasn't in the tutorial.
Though it's all covered there. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top