Hello
I have a problem that I can't understand. This errror return when I try to compile:
name 'image_name' is not defined.
This is my code:
def LoadImage(image_name):
file_name = self.clssSnc.sprites[slf.clssSnc.stat]
if self.clssSnc.stat == 0:
file_name = self.clssSnc.spritesi[slf.clssSnc.stati]
#carrega a imagem do cenĂ¡rio ou do personagem
fl = None
image_path = "sprites/" + image_name
fl = open(image_path, 'r')
if (image == "sonic"):
file_path = "sprites/" + file_name
fl = open(file_path, 'r')
image_name is defined as a parameter of method.
Please, can someone help me? Thanks