# Game Lab Code not working Debugging Help

**URL:** <https://forum.code.org/t/game-lab-code-not-working-debugging-help/33941>\
**Category:** Coding and Debugging Help\
**Created:** [December 21, 2020, 3:52pm UTC](https://forum.code.org/t/game-lab-code-not-working-debugging-help/33941 "2020-12-21T15:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bflanders](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bflanders](https://forum.code.org/u/bflanders)\
**Post date:** [December 21, 2020, 3:52pm UTC](https://forum.code.org/t/game-lab-code-not-working-debugging-help/33941/1 "2020-12-21T15:52:47Z")

</div>

[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

[https://studio.code.org/projects/gamelab/a7m9g7RZS9eZ890jk34v1X3GOfI6C1fJtXMSGnNxb0k](https://studio.code.org/projects/gamelab/a7m9g7RZS9eZ890jk34v1X3GOfI6C1fJtXMSGnNxb0k) 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.

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [December 21, 2020, 5:12pm UTC](https://forum.code.org/t/game-lab-code-not-working-debugging-help/33941/2 "2020-12-21T17:12:42Z")

</div>

@bflanders,

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!

Mike

---

<div class="post-metadata">

**Author:** ![bflanders](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bflanders](https://forum.code.org/u/bflanders)\
**Post date:** [December 21, 2020, 5:43pm UTC](https://forum.code.org/t/game-lab-code-not-working-debugging-help/33941/3 "2020-12-21T17:43:35Z")

</div>

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