I am trying to make a game where in the startscreen I want to have an animation play when press start. It gives me the error "TypeError: argument 1 must be pygame.Surface, not list". This is how I load the images for the animation:
for i in range(3, 53):
menuanimation.append(pygame.image.load("menu/menu" + str(i) +".jpg"))
Here is where it is called from the button
if event.type == pygame.MOUSEBUTTONDOWN:
mouse_pos = event.pos
if button1.collidepoint(mouse_pos):
menuanimations()
player.run = True
player.start = False
And here is where the function is
def menuanimations():
win.blit(menuanimation, (0, 0))
print("testing")