Multiple "Ands"

I’m having trouble trying to use more than one “and” in the same *if statement. I can do:

*if ((A happens) and (B happens))

But it doesn’t work if I do:

*if ((A happens) and (B happens) and (C happens))

I’ve tried altering the use of brackets, but nothing seems to work. Does anyone know how to fix the problem?

You can try,
*if (((A happens) and (B happens)) and ((C happens)))

Here is a link to help you with making more than one condition with using vars.
The key thing with logic statements like “or” and “and” is to give CS no more than 2 things to deal with at a time.

3 Likes

@Avery_Moore One easy fix is to put conditions below each other, kind of like this…

*if A happens
 *if B happens
  *if C happens
4 Likes

Both solutions work. Thanks guys! :blush:

1 Like