• 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.

[JASS] How to add more than 2 condition in JASS script???

Status
Not open for further replies.
Level 2
Joined
Jul 22, 2006
Messages
16
I am a beginer of map maker. Now I am trying to use JASS script. But i can't add more that 2 condition. When I using return GetBooleanAnd(Condition 1, Condition 2, Condition 3) the world editor show a error when I save, can someone help me????
 
Level 2
Joined
Sep 10, 2004
Messages
21
Use this:

JASS:
return Condition1 and Condition2 and Condition3 and ...

much easier :D
or, if you want to use GetBooleanAnd:

JASS:
return GetBooleanAnd(Condition1, GetBooleanAnd(Condition2, Condition3))
 
Level 5
Joined
May 22, 2006
Messages
150
"and" is much better (faster) than "GetBooleanAnd", as it is no function...
Also, using it saves some bytes of map size. ^^
 
Status
Not open for further replies.
Top