cmoney0927 Posted January 20, 2015 Share Posted January 20, 2015 Hey, I have recently been creating a platformer with multiple levels using Phaser. Everything has been going great until I tried to add a second level. Even though I did everything exactly the same way for level 2 as I did for level 1, I get the error that playStateTwo is not defined. I have looked everywhere and am at a loss. Any suggestions would be greatly appreciated. Link to comment Share on other sites More sharing options...
hyperspazzm Posted January 20, 2015 Share Posted January 20, 2015 Hey, I have recently been creating a platformer with multiple levels using Phaser. Everything has been going great until I tried to add a second level. Even though I did everything exactly the same way for level 2 as I did for level 1, I get the error that playStateTwo is not defined. I have looked everywhere and am at a loss. Any suggestions would be greatly appreciated.same Link to comment Share on other sites More sharing options...
valueerror Posted January 20, 2015 Share Posted January 20, 2015 show us the code and we can show you how to fix it Link to comment Share on other sites More sharing options...
spencerTL Posted January 20, 2015 Share Posted January 20, 2015 I always forget to include the extra level's source in the index.html <script src="js/playState2.js></script> Or to declare the stateGame.state.add(’playState2’,BasicGame.Game); Either in index or boot state.Take me a couple of minutes of puzzlement before I remember. That gives this error.If it's not this then yes the code would be essential! Link to comment Share on other sites More sharing options...
Recommended Posts