Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmx : empty layer #168

Open
Sparksx opened this issue Jun 22, 2015 · 0 comments
Open

Tmx : empty layer #168

Sparksx opened this issue Jun 22, 2015 · 0 comments

Comments

@Sparksx
Copy link
Contributor

Sparksx commented Jun 22, 2015

When an layer is empty there is the following error :

Uncaught TypeError: Cannot read property 'tileW' of undefined
Q._tmxProcessTileLayer @ quintus_tmx.js:221
(anonymous function) @ quintus_tmx.js:295
window.(anonymous function).Q._each @ quintus.js:319
Q.stageTMX @ quintus_tmx.js:292
(anonymous function) @ platformer.js:57
Q.Stage.Q.GameObject.extend.loadScene @ quintus_scenes.js:313
Q.stageScene @ quintus_scenes.js:1082
(anonymous function) @ platformer.js:96
window.(anonymous function).Q.load.loadedCallback @ quintus.js:1991
window.(anonymous function).Q.loadAssetImage.img.onload @ quintus.js:1711

It's because the sheetName var is initialised but not assigned.
You should ignore an empty layer ?

You can add an if (sheetName) stattement before var tileLayerProperties = Q._extend({ in quintus_tmx.js at line 196. With this, it's work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant