Uncaught TypeError: Cannot read property 'height' of undefined for a phaser game, using a Tiled map


#21

It looks like you’re trying to add tileset images under the wrong names (groundtop1, player1).

Expand the Tilesets: … list in the console to see what the names are.


#22

I have renamed the tileset images, and now the browser comes up with an error related to cache and width:


#23

So this one is is phaser related. When you declare a gameobject in your preload method you have to call it with its key in the create or update


#26

Which parameter is the key? Is it the first or the second?


#27

This is the basic example to understand the key feature https://phaser.io/examples/v2/basics/01-load-an-image


#28

I have now tried to stay consistent with the example you sent, but the error persists


#29

The width error is an error you mentionned early in this thread, for me it still means that you haven’t initialised your variable, but it’s a javascript error


#30

Ok, then what could must I add, as I am completely unsure at this point?


#31

If you can share your game on GitHub or dropbox or even a zip file in the forum it will be easier


#32

ok sure, i’ll try and zip it


#33

#35

So here is a little bug hunting of your code on my YouTube Channel
https://www.youtube.com/watch?v=O21Z1I9K0rs