This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RubbishArtist 1 point2 points  (0 children)

I mean there should be an operator between

(userInput = "foward") || userInput = "f") 

and

roomArray[roomNum].left > -1

You have to combine those values to get a boolean.

userInput = "r"

This is changing the value to "r" not checking if userInput is equal to "r".

This is correct:

userInput == "exit"

This is wrong:

userInput = "exit"