# Putting 3 or more variables in a \*elseif/\*if

**URL:** <https://forum.choiceofgames.com/t/putting-3-or-more-variables-in-a-elseif-if/109103>\
**Category:** ChoiceScript Help\
**Created:** [October 29, 2021, 12:25am UTC](https://forum.choiceofgames.com/t/putting-3-or-more-variables-in-a-elseif-if/109103 "2021-10-29T00:25:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArchivistAlpha096](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archivistalpha096/32/203655_2.png) [@ArchivistAlpha096](https://forum.choiceofgames.com/u/ArchivistAlpha096)\
**Post date:** [October 29, 2021, 12:25am UTC](https://forum.choiceofgames.com/t/putting-3-or-more-variables-in-a-elseif-if/109103/1 "2021-10-29T00:25:44Z")

</div>

So, just ran into something that I need 3 values to do correctly, but not quite sure of the formatting.  
Normally I do something like this:

```
*if (X =true) or (Y=true))

```

That’s for 2, but not sure if something like this,

```
*if (((x=true) or (y=true) or (d =true))

```

will work, so. If anyone could help clear this up? Would be grateful. Anyway, I hope that everyone who reads this has a good weekend.

---

<div class="post-metadata">

**Author:** ![Gower](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gower/32/21972_2.png) [@Gower](https://forum.choiceofgames.com/u/Gower)\
**Post date:** [October 29, 2021, 12:36am UTC](https://forum.choiceofgames.com/t/putting-3-or-more-variables-in-a-elseif-if/109103/2 "2021-10-29T00:36:59Z")

</div>

\*if (((x) and (y)) and (z)) is acceptable format for three.

> [@ArchivistAlpha096](#):
>
> `*if (X =true) or (Y=true))`

I believe the above needs an additional left parenthesis:

\*if ((x) or (y))

Note this thread:

> [@Is it possible... (making or/and statements with 3+ variables)](https://forum.choiceofgames.com/t/is-it-possible-making-or-and-statements-with-3-variables/2411/21):
>
> CS is always looking to evaluate two conditions. So you need to use brackets to group up your conditions into pairs. Additional brackets for when you use an equals sign as part of your comparator. All of these work. There’s other combinations, but this should cover all the main stuff. \*create Condition\_1 true \*create Condition\_2 true \*create Condition\_3 true \*create Condition\_11 10 \*create Condition\_22 10 \*create Condition\_33 10 \*if (Condition\_1 or Condition\_2) or Condition\_3 Yes \*i…

---

<div class="post-metadata">

**Author:** ![HWKEye](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hwkeye/32/31852_2.png) [@HWKEye](https://forum.choiceofgames.com/u/HWKEye)\
**Post date:** [October 29, 2021, 9:38am UTC](https://forum.choiceofgames.com/t/putting-3-or-more-variables-in-a-elseif-if/109103/4 "2021-10-29T09:38:43Z")

</div>

Basically if you are using boolean values for check then this is acceptable

```
*if ((x or y) or d)

```

but if you are using checks write in following format

```
*if (((x > 10) or (y > 10)) or (z > 10))

```
