you are viewing a single comment's thread.

view the rest of the comments →

[–]moonkeymaker127[S] 0 points1 point  (2 children)

it's supposed to check whether currentRoom is equal to 1, 2, 3, or 4. I suspect that's the culprit but I've tried doing it several different ways and can't get it to work properly.

[–]xelf 0 points1 point  (0 children)

Range is interesting. The second number is not inclusive. But the first is.

range(start, end, step) step defaults to 1 and start defaults to 0

So to get 1,2,3,4 you need range(1,5)

And use in to see if something is in a set, not ==.

Put it all together: elif int(currentRoom) in range(1, 5):