Skip to content

Index out of range #5

@midna666

Description

@midna666

Hey,

thank you for this amazing guide , i am following you to learn Pygame

i tried your code and faced the below issue can you please help here ? I see someone else had trouble with this but the issue was closed with no solution for us other coders to see.

Traceback (most recent call last):
File "d:\Pygame\Survival\code\main.py", line 25, in
game = Game()
File "d:\Pygame\Survival\code\main.py", line 11, in init
self.level = Level()
File "d:\Pygame\Survival\code\level.py", line 14, in init
self.setup()
File "d:\Pygame\Survival\code\level.py", line 17, in setup
self.player = Player((640,360), self.all_sprites)
File "d:\Pygame\Survival\code\player.py", line 14, in init
self.image = self.animations[self.status][self.frame_index]
IndexError: list index out of range

i didnt change anything , just run your code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions