0

It keeps coming up with UnboundLocalError: local variable 'can_i_get' referenced before assignment right here.

            #this makes you have to have a certain level to get better weapon.  

    #ignore this --> 
             if player_level == (10,12):  #checks if there a high level
             can_i_get = True  #this checks if its True
            elif player_level == (1,9):  #checks if there not a high level
             can_i_get = False  #this checks if its False
            else:print("you cant use that ")  

             #this makes you able to get better weapons  



     # create a dictionary of the possible moves and randomly select the damage it does when selected

            if can_i_get: 
             What = {"ROOF": random.randint(18, 10000),
                     "Power Sword": random.randint(10, 21000), #this makes the damage random
                     "Mega heal": random.randint(20, 10000)} #why do i need to keep adding these?
halfer
  • 18,701
  • 13
  • 79
  • 158
imapancake
  • 11
  • 2

0 Answers0