I have made a tiled map, but when i try to import it just keeps giving errors i've been trying this for days and still cant resolve the errors
Also forgive me for my english errors
Traceback (most recent call last):
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\davim\Documents\outros\Programação\Python\Jodo\main.py", line 12, in <module>
game_map = load_pygame("Testmap.tmx")
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\site-packages\pytmx\util_pygame.py", line 140, in load_pygame
return pytmx.TiledMap(filename, *args, **kwargs)
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\site-packages\pytmx\pytmx.py", line 370, in __init__
self.parse_xml(ElementTree.parse(self.filename).getroot())
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\site-packages\pytmx\pytmx.py", line 438, in parse_xml
self.reload_images()
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\site-packages\pytmx\pytmx.py", line 461, in reload_images
loader = self.image_loader(path, colorkey, tileset=ts)
File "C:\Users\davim\AppData\Local\Programs\Python\Python39\lib\site-packages\pytmx\util_pygame.py", line 99, in pygame_image_loader
image = pygame.image.load(filename)
FileNotFoundError: No such file or directory.
Here's my code so you can see what is wrong and help me
import pygame
from pygame.locals import *
from pytmx.util_pygame import load_pygame
pygame.init()
# -----Variaveis------
largura = 1000
altura = 600
background = (0,0,0)
screen = pygame.display.set_mode((largura, altura))
game_map = load_pygame("Testmap.tmx")
# ----MapLoader----
images = []
for y in range(50):
for x in range(50):
image = game_map.get_tile_image(x,y,0)
images.append(image)
# Desenhe todos os tiles na tela
i = 0
for y in range(50):
for x in range(50):
screen.blit(images[i],(x * 32, y * 32))
i += 1
# -----Display-----
pygame.display.set_caption('Jodo foda')
tmxdata = load_pygame('Jodo\maps\map.tmx')
# -----Loop-----
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False