I use dict to shorten things as I have multiple files that I need to load. But when I run it I get this message :
TypeError: 'type' object is not subscriptable
My code:
m1 = pygame.image.load(dict[1])
m2 = pygame.image.load(dict[2])
m3 = pygame.image.load(dict[3])
dict = {1: "walk1.png", 2: "walk2.png", 3: "walk3.png"}
playerxy = (375,130)
window.blit(m1, (playerxy))
How can I get this to work?