TypeMismatchError after editing map

Hi all,

I’ve just started contributing to a game on Github and they are using Tiled, I’ve never used it before. The game works fine and the map is saved as a .JSON file. The .TMX is provided in the repository.

On my system, If I add anything to the map in Tiled then export a new .JSON file, the game wont run and I get the following error:

[Error] TypeMismatchError: DOM Exception 17: The type of an object was incompatible with the expected type of the parameter associated to the object.
	drawImage
	draw
	renderRegion
	renderFull
	render
	postUpdate
	postUpdate
	postUpdate
	updateLogic
	update
	updateRAF
	_onLoop

This happens when I add one of the pre-existing tilesets, any of them.

I’m using Tiled Map Editor Version 0.16.1 on Mac OSX 10.11.2 the problem occurs in both Safari and Chrome.

This sounds like the game you are making maps for has an issue with some kind of new tiled features… I fear you will need to debug your game there… The issue does not seem to be within tiled here (unless it is some kind of unwanted backwards incompatibility).

Would be nice if you could report back what the issue was… Was it some kind of new property?

Regards,
Ablu

Thanks for the reply Ablu, I’m still investigating the problem. I’ve narrowed it down to adding certain items within the game, specifically the “Jetpack”. Here’s the project on Github:

When I get it figured out I’ll report back :slight_smile:

//Jim

Ok, finally worked out what was wrong, I was adding the jetpacks to the world layer - doh!
They should be on the objects layer so that the javascript code can find them.

School boy error!

glad you found it :slight_smile:

Regards,
Ablu