2D-Mario-style-platformer
2D-Mario-style-platformer copied to clipboard
error in player
self.image = self.animations['idle'][self.frame_index]
is giving me an error idk why
from os import walk
def import_folder(path):
for img in walk(path):
print(img)
import_folder('../graphics/character/idle')
i checked with this but still no output(its printing nothing)
@clear-code-projects
I had the same issue. Mine worked after getting rid of '../' in the file path and just having import_folder(graphics/character/idle'). I tested it both with the same file directory as well as moving the code files outside of the code folder, and they both worked.
make it ./ instead of ../ i tried that and it worked
Just remove this from the character path -> ../ Like this: character_path = 'graphics/character/'