Phaser advanced timing error

I’m trying to use advanced timing in my game but I see this:

What’s on line 102 of game.js?

The application you see is anWriter (for android mobiles).

game.js is the file where the global game variables are defined. That’s where you write:

window.onload = function() {
game = new Phaser.Game(config);
game.state.add('Boot', boot);
game.state.add('Logo', logo);
game.state.add('Preload', preload);
game.state.add('TitleScreen', titleScreen);
game.state.add('PlayGame', playGame);
game.state.add('GameWin', gameWin);
// line 102 ↓↓↓
game.time.desiredFps = 60; // Doesn't work

The game hasn’t booted yet, so game.time doesn’t exist.

You can set it in your “Boot” state instead, or use the game’s onBoot signal.

You also need to turn off the game’s forceSingleUpdate.