Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

How to move to a certain line in the program?

Sara3015
Sara3015

If the user inserts a different word that is not "punch" or "defend", I would like the message to pop up and then it should repeat the question at the start (line 17) - "What would Player1 like to do?"

Currently the whole game ends if you misspell a word or don't type in the correct words.

Also I think there might even be a more compact way of doing this - maybe using cases?

(btw I haven't finished the game so there's a different error that comes up stating that I haven't used the variable player1)

image

2 years ago
You are viewing a single comment. View All
1