I am writing a python (pgzero) project for a simple game with my teacher, but I wanted to improve it a bit. After adding something like a minimap, everything was fine, but after writing the next stage of the code, it stopped working completely. For other students who prescribed code identically to the teacher, everything works properly, unfortunately for me, it does not. Thank you in advance for any help. If more project code is needed I can share.
Terminal error:
Traceback (most recent call last):
File "C:\Users\Olek\AppData\Local\Programs\Python\Python38\lib\site-packages\pgzero\clock.py", line 168, in tick
cb()
File "C:/Users/Olek/PycharmProjects/gra_mars_alfa/gra.py", line 533, in petla_glowna
if mapa_pom[bohater_y][bohater_x] not in ob_mozna_stac:
NameError: name 'mapa_pom' is not defined
If I'm using terminal to run project terminal says:
PS C:\Users\Olek\PycharmProjects\gra_mars_alfa> pgzrun gra.py
pygame 2.1.0 (SDL 2.0.16, Python 3.8.0)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "c:\users\olek\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\olek\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Olek\AppData\Local\Programs\Python\Python38\Scripts\pgzrun.exe\__main__.py", line 7, in <module>
File "c:\users\olek\appdata\local\programs\python\python38\lib\site-packages\pgzero\runner.py", line 77, in main
src = f.read()
File "c:\users\olek\appdata\local\programs\python\python38\lib\encodings\cp1250.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 24633: character maps to <undefined>