User Profile
Collapse
-
That missing parentheses... I put it there and suddenly everything works perfectly. Thank you so much! -
The whole function is quite long, but sure. It's supposed to create the enemies in a text game I'm working on.
...Code:# Randomly generates enemies def create_enemies(difficulty, mode, current_location, battles): # Clears enemies from the last battle enemies = [] # List of possible names for the enemies to use names = ["Aiden", "James", "Sam", "Aidan",
Leave a comment:
-
Invalid Syntax Error for an If Statement in a Function
For some odd reason my code was all working fine until I made a few changes which broke almost everything in the function. I've since removed said changes but it's still broken. It's saying the colon in this section is Invalid Syntax. In fact it's saying the same for every if statement as well as some of the comparison operators.
Code:if difficulty == "e": number_enemies -= 1
No activity results to display
Show More
Leave a comment: