Unexpected file loaded

I have a file:


alongside I also made a copy of an old version:

car-table-38-38 copy.png

It took me a while to figure out why my changes weren’t showing in the game.

It turns out the game selects the “copy” file (maybe because it has an older timestamp?) rather than the correctly named file.

I would expect only files that have exactly correct formatting of the filename to be loaded.

I’m using Lua SDK.

oh, yep. We’re ignoring everything between the height value and the extension. :frowning:

sscanf(p + strlen("-table-"), "%i-%i", &cellwidth, &cellheight)

I’m guessing it compiled them both but they had the same name and the copy was compiled second. I’m not sure the right way to handle this… ignore the file if has extra gunk after the height field? I’ve got it filed now, anyway…

1 Like

From the documentation:

They are loaded from a single file in your game’s source folder with the suffix “-table-<w>-<h>” before the file extension.

My understanding has always been that that to be treated as a imageTable it has to end with “-table-<w>-<h>” otherwise this is just a normal image. So I would simply expect car-table-38-38 copy.png to be exported as a simple image call car-table-38-38 copy


Yeah, that makes sense. (even if it is more annoying to code :stuck_out_tongue:) I’ve got this targeted for next patch after 1.1.