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 Introducing JavaScript Let's Make a Game Doing Things With Functions

derek loureiro
derek loureiro
3,239 Points

the game will not load when i preview, black screen

during the doing things with functions video, once i add the "create item" code it does not load the game. black screen

Steven Parker
Steven Parker
229,732 Points

To facilitate analysis of your issue, make a snapshot of your workspace and post the link to it here.

7 Answers

Steven Parker
Steven Parker
229,732 Points

Was this snapshot made after the problem occurred? I forked the snapshot and opened the preview and the game appears as expected.

And I'm using the Chrome browser, you?

derek loureiro
derek loureiro
3,239 Points

opera, the game does not load in multiple browsers for me. And yes it still has problems regardless of me editing code.

Steven Parker
Steven Parker
229,732 Points

OK, but the code in this snapshot appears to be before the additional items are added to it. Is this the code that causes the blank screen, or does that happen after you make changes to it?

And if the issue only happens on one kind of browser, this might be something to take up with the Support staff.

Peter Stone
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Peter Stone
Front End Web Development Techdegree Graduate 20,124 Points

Perhaps go through your CSS and see if it is correct or if there is a comma missing somewhere. I ran into the same issue, then realized I just had ONE comma missing from a value and that is what was causing the problem. Once I corrected it, loaded just fine.

Hey man. Try add https:// before the link. I had the same problem on chrome. When I added https:// the game appeared.

Let me know if this helped you or not :)

Gheorghe Chiotoroiu
Gheorghe Chiotoroiu
8,425 Points

i have the same problem here : https://w.trhou.se/s277b6ma8s when i hit preview black screen.

Steven Parker
Steven Parker
229,732 Points

In your case, the function "addItems" is missing a closing brace (on or around line 20).

For future questions, give yourself the best chance for your question to be seen and answered by starting a fresh one!

Luis Senior
Luis Senior
10,432 Points

I have this up on my text editor instead of treehouse workspaces and it only opens a teal square. im using open index.html . looks like its hitting it but not getting the rest of the png files showing up. it works when i preview it on workspaces and i copied the exact code to try to fix it and nothing happened

derek loureiro
derek loureiro
3,239 Points

https://imgur.com/a/R0fgw

I have been running into no issues with codeschool.com, already completed beginner 1 on that site.

Steven Parker
Steven Parker
229,732 Points

A snapshot is not the same thing as a "screenshot". It allows the entire workspace to be "forked" so that the issue can be replicated and analysed.

Click on the highlighted word for a video explaining how to make and share a workspace snapshot.