IamStuck Posted June 3, 2014 Share Posted June 3, 2014 Hi, I recently decided to have a go at making a game (a very simple one) and have run into an error and I am now unsure what to do.I'm using version 2.0.5 and the error I get is 'TypeError: h is undefined' (In firebug it says the error is coming from phaser.min.js) My game is split into states (load, game, menu, level) I've pasted my level code into JSFiddle http://jsfiddle.net/PrZPA/ Thank you for any help and if you need more info then I'll provide it. Link to comment Share on other sites More sharing options...
Mike Posted June 3, 2014 Share Posted June 3, 2014 Without digging too much. Why don't you try with the non minified version and see what is undefined... or maybe it's going to work with it. Give it a try just copy phaser.js to the source folder and change phaser.min.js to phaser.js and give as info again. Link to comment Share on other sites More sharing options...
IamStuck Posted June 3, 2014 Author Share Posted June 3, 2014 Hi Mike, thanks for the help. I did what you said and the new error I get is 'TypeError: data is undefined' (this.width = data.width; line 52601) Link to comment Share on other sites More sharing options...
rich Posted June 3, 2014 Share Posted June 3, 2014 I loaded your fiddle to see but it's completely empty. Link to comment Share on other sites More sharing options...
IamStuck Posted June 3, 2014 Author Share Posted June 3, 2014 Hi Rich, it should work now. http://jsfiddle.net/PrZPA/ Link to comment Share on other sites More sharing options...
Mike Posted June 3, 2014 Share Posted June 3, 2014 It's the same link, and it's all empty... If you click update it should add /1/, /2/, /3/ to the link and so on... like: http://jsfiddle.net/b7MpV/3/ Link to comment Share on other sites More sharing options...
IamStuck Posted June 3, 2014 Author Share Posted June 3, 2014 http://jsfiddle.net/PrZPA/3/ (Sorry, still new to this) That should work. Link to comment Share on other sites More sharing options...
j0hnskot Posted June 3, 2014 Share Posted June 3, 2014 It seems that the problem is in your tilemap. What type of tilemap is? can you link the line where you preload it? Link to comment Share on other sites More sharing options...
IamStuck Posted June 3, 2014 Author Share Posted June 3, 2014 Hi, I made the tilemap with Tiled and exported using Json. Here is the preload state where I load the tilemap. (load.js) http://jsfiddle.net/TtRSt/Q8bvu/ Link to comment Share on other sites More sharing options...
IamStuck Posted June 4, 2014 Author Share Posted June 4, 2014 Still don't know how to fix this, any ideas? thank you Link to comment Share on other sites More sharing options...
IamStuck Posted June 6, 2014 Author Share Posted June 6, 2014 bump Link to comment Share on other sites More sharing options...
Recommended Posts