If statement and variables

You have to always group parentheticals in pairs. Also, it looks like you have an extra variable . . . is ‘appearance’ set to Black Dragon, White Dragon, and so on?

In that case, you might try this:

*if (((appearance = "Black Dragon") or (appearance = "White Dragon")) or ((appearance = "Red Dragon")))

Is that what you wanted? Or are appearance and each of the dragon colours separate variables? I’m not quite clear as to what you were hoping the code would do, or which variables it’s supposed to be checking.

Lynnea Glasser’s tutorial (which is brilliantly helpful, thank you @Lglasser!) covers using multiple variables too, so you might want to give that section of the tutorial a read-through for some examples.

5 Likes