Game Lab Code not working Debugging Help

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

Link to the project or level: [replace with link to the curriculum or get the “Share” link to a project]
What I expect to happen: [replace with a detailed description of the behavior you’re trying to create]
What actually happens: [replace with a detailed description of what actually happens when the code runs including any errors or unexpected behavior]
What I’ve tried: [replace with a detailed description of what you’ve already tried to do to solve the problem Can not figure why the points won’t work and why there is an error message, tried changing the words to score but that doesn’t seem to work as well.


Welcome to the forum! It looks like you are declaring the points variable several different times in your code. You declare it at the beginning (which is the best place to declare this since it is used throughout the game), but then you declare it 3 more times.

Once you use var points = 0, any further reference should be strictly to “points” without var in front of it … eg. points=points+10

Guessing once you clean it up, all of your errors should disappear.

Let us know if we can help any further!


Thanks, I missed that on the student. Many, Many Thanks