godot-tiled-importer icon indicating copy to clipboard operation
godot-tiled-importer copied to clipboard

tmx file refused to update in godot. problem is object.type is int

Open strimmlarn opened this issue 4 years ago • 0 comments

Plugin version

Tiled importer 2.3 from asset library Godot version 3.2.2.stable downloaded from steam

Issue description Map doesn't update in godot because I get error.

When saving tmx file in tiled godot shows this error message: res://addons/vnen.tiled_importer/tiled_map_reader.gd:945 - Invalid operands 'int' and 'String' in operator '==' Line 945 in tiled_map_reader.gd is: if object.type == "navigation" or object.type == "occluder": If I print object it is: {height:56, id:1, rotation:0, type:1, visible:True, width:128, x:0, y:0}

Steps to reproduce Don't know what caused it. I was making a new tileset from a image that I used in another tileset becuse I wanted to change the tile height and width. Maybe that had something to do with it.

Sample map or tileset tmxfile.zip

Steps to fix I made a line before line 945 in tiled_map_reader.gd with the code: object.type = str(object.type) and it worked.

Maybe that can cause more problems, I don't know. But its working so far.

strimmlarn avatar Jul 05 '20 10:07 strimmlarn