Ask coding questions

← Back to all posts
Saying invalid syntax when the line is fine
Scoop5 (3)

Hello everyone, I am working on making a text based game and I am trying to add potions. I made a function exactly like the one below but with attack instead of shield. It is giving me no error, but this function is saying the if statement has invalid syntax, and I can’t figure out why.
if(playerMoves == (pMoves + 3)): (This the line that is having an issue, the function starts on line 200)

Answered by Geocube101 (623) [earned 5 cycles]
View Answer
Geocube101 (623)

On lines 199 and 211, you are missing a closing parenthesis ")" to close the print statement

Scoop5 (3)

@Geocube101 there were a few other errors too, but thank you for finding that because the rest were super easy to fix!

AnshDhody (0)

nice man i love it!