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 trialMichael Molaro
730 PointsCan't get the star!
line 29, under add collectible items createItem(125, 50, 'star');
and in line 97 i added this under the before game beings game.load.spritesheet('star', 'star.png',32,32);
what did i miss?
1 Answer
KRIS NIKOLAISEN
54,972 PointsI added the same code and the star appeared. But the code was added to lines 27 and 93. For creating the item line 29 is outside the addItems() function. And for the spritesheet line 97 is outside the preload() function. Or did you add several blank lines?
Kevin Gates
15,053 PointsKevin Gates
15,053 PointsCan you add all of your code? Don't forget to use the Markdown Cheatsheet. So javascript will be:
backtick backtick backtick javascript **your code backtick backtick backtick
So something like this:
var yourVariable = example;