# A question about "And" and "Or"

**URL:** <https://forum.choiceofgames.com/t/a-question-about-and-and-or/676>\
**Category:** ChoiceScript Help\
**Created:** [August 11, 2012, 3:49am UTC](https://forum.choiceofgames.com/t/a-question-about-and-and-or/676 "2012-08-11T03:49:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [August 11, 2012, 3:49am UTC](https://forum.choiceofgames.com/t/a-question-about-and-and-or/676/1 "2012-08-11T03:49:53Z")

</div>

So, I’ve been developing a game recently, and I am stuck on something. How can I use multiple “and” and “or” in an \*if statement? For example, instead of making this:  
\*if (x) and (y)  
–\*if z  
----\*goto Next  
–\*else  
----\*goto Next2  
\*else  
–\*goto Next2

I would like making this, as it’s far less time consuming (I have lots of those in my game):

\*if (x) and (y) and (z)  
–\*goto Next  
\*else  
–\*goto Next2

If anyone knows how to do this, that is, if it is possible to, tell me, I really need it.

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [August 11, 2012, 4:28am UTC](https://forum.choiceofgames.com/t/a-question-about-and-and-or/676/2 "2012-08-11T04:28:54Z")

</div>

\*if ((x) and (y)) and (z)

\*if ((a) and (b)) or (© and (d))

Basically, you just need to put an extra set of parenthesis around each _pair_ of conditions, as with both of the examples above. “Or” works the same way, but when you have multiple conditions like that, and a mixture of “and” & “or” on the same line, just be careful that your logic makes sense–the more intricate you make the condition, the more likely you are to leave holes in it (or more likely, make it virtually impossible to ever meet _all_ the conditions).

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [August 11, 2012, 4:48am UTC](https://forum.choiceofgames.com/t/a-question-about-and-and-or/676/3 "2012-08-11T04:48:49Z")

</div>

@Vendetta, I see, thanks for the help!
