I am a python and pygame noob, looked up a tutorial for loading sprites in to my game, and I'm getting syntax error for this this line of code
except pygame.error, message:
^
SyntaxError: invalid syntax
This is the entire block of code:
def load_image(self, image_name):
try:
image = pygame.image.load(image_name)
except pygame.error, message:
print "Cannot load image: " + image_name
raise SystemExit, message
return image.convert_alpha()
I didn't check if the tutorial was for python 3.4.2 or not, has the syntax changed?
Or is there something else wrong with my code?