hopgop1 Posted February 26, 2018 Share Posted February 26, 2018 ------------- Quote ------------------------------------ Link to comment Share on other sites More sharing options...
Adel Posted February 26, 2018 Share Posted February 26, 2018 Check Phaser.GameObjectFactory .button method Link to comment Share on other sites More sharing options...
samme Posted February 26, 2018 Share Posted February 26, 2018 3 hours ago, hopgop1 said: Uncaught TypeError: this.onCreateCallback.call is not a function That sounds like there's a problem with the state's create property. Link to comment Share on other sites More sharing options...
hopgop1 Posted February 26, 2018 Author Share Posted February 26, 2018 8 hours ago, Adel said: Check Phaser.GameObjectFactory .button method I had a good look at that and all I could see was that the function call is optional, but I don't think I've done anything wrong there as far as I can tell. Link to comment Share on other sites More sharing options...
hopgop1 Posted February 26, 2018 Author Share Posted February 26, 2018 5 hours ago, samme said: That sounds like there's a problem with the state's create property. I also looked at how my create was defined above, but I've called it the same thing everywhere I need to reference it, no typos or anything from what I can see, just really stumped as to what I've done wrong. Link to comment Share on other sites More sharing options...
samme Posted February 26, 2018 Share Posted February 26, 2018 Can you post the whole script? Link to comment Share on other sites More sharing options...
samme Posted February 27, 2018 Share Posted February 27, 2018 11 hours ago, hopgop1 said: Uncaught TypeError: this.onCreateCallback.call is not a function When exactly do you get this error? Ordinarily that would happen while a state is starting. Link to comment Share on other sites More sharing options...
hopgop1 Posted February 27, 2018 Author Share Posted February 27, 2018 9 minutes ago, samme said: When exactly do you get this error? Ordinarily that would happen while a state is starting. Yep happens as soon as the state loads. It also creates 2 smaller weird windows below the actual game, but I think that’s a separate issue Link to comment Share on other sites More sharing options...
samme Posted February 27, 2018 Share Posted February 27, 2018 Make sure you have only one new Phaser.Game(…). See https://codepen.io/samme/pen/bLQeoV?editors=0010 Link to comment Share on other sites More sharing options...
hopgop1 Posted February 27, 2018 Author Share Posted February 27, 2018 8 hours ago, samme said: Make sure you have only one new Phaser.Game(…). See https://codepen.io/samme/pen/bLQeoV?editors=0010 You absolute genius, I knew it would be a simple error, I suppose that's what I get for using parts of other peoples code . I get a different error now relating to my game over state, but I'll try and solve that myself. Thank you so much samme!! Link to comment Share on other sites More sharing options...
Recommended Posts