n3amarvalia Posted April 26, 2015 Share Posted April 26, 2015 Hi All, this is my first post, I recently discovered the Phaser framework and I really really enjoy it =). I have a problem now tho, I wanted to code out the tanks game example located on the site, but when i tired to run the game I ran into a show stopping error: TypeError: c is null JSONData: function(a,c,d)if(!c.frames) This is located in my phaser.min.js on (line 12, col 29368) I tired tracing the code back but couldn't seem to figure this problem out. Im going to assume that this is being thrown from my line of code in my main.js: game.load.atlas('tank','assets/tanks/tanks.png');I was searching the phaser.js file and located the atlas function and noticed the parameters are :atlas: function (key, textureURL, atlasURL, atlasData, format) So i feel like I'm missing some understanding here, any help would be greatly appreciated p.s.: also any general posting tips would be awesome too Quote Link to comment Share on other sites More sharing options...
rich Posted April 26, 2015 Share Posted April 26, 2015 An atlas needs a texture (which you've got) AND a json data object that describes how all of your images are laid out in the texture. You're missing that bit, which is why it's erroring. Are all of your sprites actually in a texture atlas? I'd suggest you use phaser.js to develop with (not phaser.min.js) as you'll get much more exact line numbers and less strange error messages too Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.