I am using pygame and vscode to make a zelda themed rpg.
But when I was creating the level, I stumbled upon this error in 'level.py':
https://github.com/yedonbro/pygamer/raw/main/Untitled.png
the console:
I am using pygame and vscode to make a zelda themed rpg.
But when I was creating the level, I stumbled upon this error in 'level.py':
https://github.com/yedonbro/pygamer/raw/main/Untitled.png
the console:
Your def run
is one tab over the supposed indentation.
Do this
def __init__(self):
something...
def run(self):
other_things...
instead of
def __init__(self):
something...
def run(self):
other_things...
You are probably mixing tabs and spaces to indent your code. Make sure all indentations are actually 4 spaces, and not tabs. (You can use spaces or tabs for indentation in Python, but it needs to be consistent, you can't mix both).
there's some problem with vs i guess, do ctrl shift p then search for "convert indentation to spaces"
then it should be fixed, you can switch to tabs after