Phaser difficulties

I am new to coding and am having trouble with phaser. I am on steps 17 and 18 for Bug Invaders and I have used the get help section to copy the exact code but it still isn’t working. This is the code I have before it breaks: gameState.bugRepellent = this.physics.add.group();

this.physics.add.collider(gameState.enemies, gameState.bugRepellent, (bug, repellent) => {
bug.destroy();
repellent.destroy();

});
}
When I input:
gameState.scoreText.setText(‘Bugs Left
${numOfTotalEnemies()’})

the whole screen where the results of the code show up turns white
I believe it might have something to do with syntax because some of the words like “bugs left” are gray on the instructor’s screen but not on mine. If there’s anything you can do to help, that would be great.

especially if it’s syntax it helps to put your code in preformatted text (</>).

I personally like to write through a text editor for more accuracy with syntax (I use sublime but I hear vs code is great for catching js things).

1 Like