Issue with loading Tiled-maps with ATL and STI *file added*
Posted: Sat Sep 19, 2015 5:18 pm
Hi,
I'm new to both Löve and Tiled. I'm trying to make a simple platformer and was following this tutorial. Even though it's old it's the best I could find.
Everything was working out nicely until I tried loading a map from the Tiled editor. I can load the map graphically but when I add the findSolidTiles(map) function (code) I get the following error message:
Then I tried downloading the tutorial project but got another similar error when trying to run it.
I then tried using STI instead since I found out that ATL development was discontinued a couple of years ago, but when using a very simple example that I found somewhere in the documentation I get the following error message:
So my guess now is that I'm doing something wrong in Tiled. But I have tried everything I can come up with in it and it shouldn't be anything with the format since ATL uses .tmx and STI uses .lua-files? My other guess is that I don't initiate the map correctly but since I got it to render graphically and since I get a similar error with simpler code and STI I'm leaning more towards the problem being something related to Tiled.
Does anyone recognize this problem or know what I'm doing wrong? Thanks in advance.
I'm new to both Löve and Tiled. I'm trying to make a simple platformer and was following this tutorial. Even though it's old it's the best I could find.
Everything was working out nicely until I tried loading a map from the Tiled editor. I can load the map graphically but when I add the findSolidTiles(map) function (code) I get the following error message:
Seems like the map is loaded but not the list of layers from the map. I saw that several people were complaining about the same issue in the comments but that they could solve it by changing the name of the layer. I tried renaming the layer and restarting Tiled and making completely new maps in different formats but nothing worked. I looked at the documentation for ATL and tried changing the way the layers were loaded but only got different but similar errors.Error
main.lua:54: attempt to index field 'tl' (a nil value)
Traceback
main.lua:54: in function 'findSolidTiles
main.lua:19: in function 'load'
[C]: in function 'xpcall'
Then I tried downloading the tutorial project but got another similar error when trying to run it.
I then tried using STI instead since I found out that ATL development was discontinued a couple of years ago, but when using a very simple example that I found somewhere in the documentation I get the following error message:
Error
sti/map.lua:204: attempt to compare number with nil
Traceback
sti/map.lua:204 in function 'setTileData'
sti/map.lua:170: in function 'setLayer'
sti/map.lua:56: in function 'init'
sti/init.lua:38: in function 'new'
main.lua:4: in function 'load'
[C]: in function 'xpcall'
So my guess now is that I'm doing something wrong in Tiled. But I have tried everything I can come up with in it and it shouldn't be anything with the format since ATL uses .tmx and STI uses .lua-files? My other guess is that I don't initiate the map correctly but since I got it to render graphically and since I get a similar error with simpler code and STI I'm leaning more towards the problem being something related to Tiled.
Does anyone recognize this problem or know what I'm doing wrong? Thanks in advance.