# CSD Lesson 13. Code stop line 8 - Type error\_

**URL:** <https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487>\
**Category:** Coding and Debugging Help\
**Created:** [October 18, 2019, 8:02am UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487 "2019-10-18T08:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![glen.strickland](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@glen.strickland](https://forum.code.org/u/glen.strickland)\
**Post date:** [October 18, 2019, 8:02am UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487/1 "2019-10-18T08:02:40Z")

</div>

> **[Check out what I made](https://studio.code.org/projects/gamelab/FhJj4MXQZ5di8n5b4UKzmXzNaNIapeh2XuKAtWi-6vM)**
>
> I wrote the code myself with Code.org

I can’t figure out why it gives a type error on line 8 as that code was already provided.  
So I can’t see if what I’m doing is correct (which very well may not be).

What I think I want to say is:  
If mouse click down  
var\_click = var\_click + 1

If this is correct how do I put the second var\_click in?

Thanks

---

<div class="post-metadata">

**Author:** ![mkmietowicz](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mkmietowicz/32/6322_2.png) [@mkmietowicz](https://forum.code.org/u/mkmietowicz)\
**Post date:** [October 19, 2019, 4:15am UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487/2 "2019-10-19T04:15:07Z")

</div>

Hi @glen.strickland,

For troubleshooting & debugging issues, it helps the moderation team if you can provide the info with the template on the debugging page:

1. Link to your project: click the “Share” button at the top of the page and paste the link it produces into your post.
2. Are there any particular steps that cause the error?
3. What did you expect the program to do?
4. What did it do instead?

That said, there’s two possible errors I can see:

- The pseudocode you typed above says “mouse click down” – there’s a different event name in Game Lab. Check that everything matches exactly, including spacing and capitalization.
- If you want to use the structure “variable = variable + 1;” you’ll need to use one of the blocks in the Math drawer to make that work:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/a/a96858aba94f62bb5fb635c705bbf4172d5d433a.png)

There are also example solutions if you expand the teacher menu on the right side of the screen:

![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/f/fa9c067f8f03d81e2d5c8fb9e5cdb05e97dd4f3c.png)

Hope that helps,  
–Michael K.

---

<div class="post-metadata">

**Author:** ![glen.strickland](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@glen.strickland](https://forum.code.org/u/glen.strickland)\
**Post date:** [October 19, 2019, 8:04am UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487/3 "2019-10-19T08:04:26Z")

</div>

I’m just getting used to using the forum and I appreciate your patience. Part of my learning process is putting a screenshot in messages.  
The example code does not appear when I expand the menu on the right.

 ![Capture](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/1/11a26d2c7d27d09a99b6ddf42a3b2683827d1982.png)

---

<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:** [October 19, 2019, 5:08pm UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487/4 "2019-10-19T17:08:11Z")

</div>

@glen.strickland … Hmmm … not sure why the answer keys don’t show up in your teacher panel. I might try logging out and then logging in again to see if that solves it. If not, you could send a message to [support@code.org](mailto:support@code.org) and see if they can help troubleshoot that one.

I took a look at your code and it looks like you have it mostly correct, all but one thing. On line 11 (inside the if block), you are using the same block as you are using on line 1 to declare the variable ‘clicks’. In programming you only declare it one time. The block you use to declare it starts with “var”. Then, later in your programming, you only need to refer to it by name (no var in front). So you will want to look for the variables block that doesn’t start with var… (x = \_\_). Then, change the x to the variable name and put your counting formula in the other side of the block.

Since this is a student task and students have been known to lurk in the forum, I won’t link my code, but once I fixed that small block, it did start working for me. If you still have problems, though, don’t hesitate to post a reply.

Best Wishes!

Mike

---

<div class="post-metadata">

**Author:** ![glen.strickland](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@glen.strickland](https://forum.code.org/u/glen.strickland)\
**Post date:** [October 20, 2019, 12:13pm UTC](https://forum.code.org/t/csd-lesson-13-code-stop-line-8-type-error/31487/5 "2019-10-20T12:13:33Z")

</div>

Many thanks Mike. I now have the counter working.
