Logo Platform
logo amplifiers simplified

Tiled map editor saves map files incorrectly

Reply
Copied to clipboard!
7 years ago
Oct 2, 2017, 4:23:55 PM

I'm sure that this is the problem, because even the blank tutorial map from the official guide is being corrupted upon saving even with no changes made and the game can't read it.


Parts of the error report are in Polish for some reason (I use Windows in Polish, so maybe that's why), I will translate them below.



"Dokument XML zawiera błąd" = XML document contains an error

"Wartość nie może być zerowa" = Value cannot be zero

"Nazwa parametru" = Parameter name

"w" = in

"Koniec śladu stosu wyjątków wewnętrznych" = End (of trace) of internal exceptions stack


I upload my test map here, it's a filled in blank map from the official tutorial. Made in Tiled ver. 27/09/2017 Windows x64.


MapCreationTutorial.tmx

0Send private message
7 years ago
Nov 3, 2017, 12:25:57 AM

Hey, I think I know the solution to your problem, I encountered the same error and did this;

Open your map file in a text editor (your *.tmx file) and replace -all- occurences of '<tile/>' with '<tile gid="0" />'. If this doesn't solve your problem I don't know what will, it solved mine.


Explanation (if you want to know how I found out):

I'm an amateur programmer and to me the error message was understandable. When the game reads your map (*.tmx), it encounters an exception at line 4187, column 5; there is a null argument, meaning the game tries to fetch some data that is not present in the map, which is the 'gid="0"' part that is missing from all the tile tags. By looking at the map in the map creation thread from this forum, and a map from the Steam Workshop,  I quickly realised that in the tileset tags of those maps, the default tile tags all had the 'gid="0"' argument, whereas my map saved with Tiled didn't have any arguments at all. A quick search and replace with '<tile/>' --> '<tile gid="0" />' and my-oh-my, the map suddenly loads error free :D .

0Send private message
?

Click here to login

Reply
Comment