problem occured with get_tile_image_by_gid()
Hello everyone, I'm still rookie in programmation, but i decided to deeply understand pytmx for a personnal project.
self.map is my TileMap, i'm actually trying to get tiles's images of my map in the code in this way :
for gid in self.map.tiledgidmap.values() :
print(gid) #work well, i got all the gid like in the .tmx file
image = self.map.get_tile_image_by_gid(gid) #here the error
print(f"gid {gid} : {image}")
but i got an error with the method get_tile_image_by_gid() that i still dont understand after several hour of debugging ^^' Actually I did all the checking chatGPT advice me and all "should" be working
Traceback (most recent call last): File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\pytmx\pytmx.py", line 717, in get_tile_image_by_gid return self.images[gid] ~~~~~~~~~~~^^^^^ IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\rvvr4\OneDrive\Bureau\Programmation\pygame\towerdef_tiles\main.py", line 45, in
here the code => files in good dir, class Tile and tile.tmx (forget line 37,38)