Page 1 of 1

[SOLVED] Sti and Tiled export problem

Posted: Wed Jun 20, 2018 1:15 pm
by Lirija
Hello everyone, i'm having a strange problem with sti and Tiled:
"every now and then" when i export a map i have an error message:
attempt to index local "tile" (a nil value)
So checked the differences between the maps that can be loaded and the ones which raise an error using git command:

git diff --no-index --word-diff level_7.lua level_8.lua

and it seems that the new map doesn't export it's object tileset. (i used tiled templates for every entity in the map)

Code: Select all


[-    },-]
[-    {-]
[-      name = "objects_tileset",-]
[-      firstgid = 73,-]
[-      filename = "objects_tileset.tsx",-]
[-      tilewidth = 16,-]
[-      tileheight = 16,-]
[-      spacing = 0,-]
[-      margin = 0,-]
[-      image = "objects_tileset.png",-]
[-      imagewidth = 96,-]
[-      imageheight = 16,-]
[-      tileoffset = {-]
[-        x = 0,-]
[-        y = 0-]
[-      },-]
[-      grid = {-]
[-        orientation = "orthogonal",-]
[-        width = 16,-]
[-        height = 16-]
[-      },-]
[-      properties = {},-]
[-      terrains = {},-]
[-      tilecount = 6,-]
[-      tiles = {-]
[-        {-]
[-          id = 0,-]
[-          properties = {-]
[-            ["name"] = "player"-]


I'm aware this one could be a Tiled problem so it might not be relevant in the love2d forum but someone might have faced this problem before.

EDIT: i put and erased a tile object in the map and now it words fine, it seems like tiled doesn't export information about the tileesets it doesn't "directly" use