User Profile

Collapse

Profile Sidebar

Collapse
Clabbage
Clabbage
Last Activity: Oct 5 '13, 03:38 AM
Joined: Oct 3 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • That missing parentheses... I put it there and suddenly everything works perfectly. Thank you so much!
    See more | Go to post

    Leave a comment:


  • 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",
    ...
    See more | Go to post

    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
    See more | Go to post
No activity results to display
Show More
Working...