Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Anton Sigurdsson
Anton Sigurdsson
1,357 Points

My code in Workspace is wrong

// add collectable items to the game function addItems() { items = game.add.physicsGroup(); createItem(375, 400, 'coin'); createItem(575, 500, 'coin'); }

// when the player collects an item on the screen function itemHandler(player, item) { item.kill(); currentScore = currentScore + 10; if (currentScore === winningScore) { createBadge(); } }

I dont get ad platform command below, I have gone through this tutorial a few times and it is always missing.

1 Answer

Could you take a snapshot of your workspace and post link here?