# Code help for Lesson 20

**URL:** <https://forum.code.org/t/code-help-for-lesson-20/33574>\
**Category:** CS Discoveries\
**Created:** [October 21, 2020, 12:26pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574 "2020-10-21T12:26:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennifer.hemry](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jennifer.hemry/32/4710_2.png) [@jennifer.hemry](https://forum.code.org/u/jennifer.hemry)\
**Post date:** [October 21, 2020, 12:26pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574/1 "2020-10-21T12:26:35Z")

</div>

My student created this game: [https://studio.code.org/projects/gamelab/ZiihJxNoCeb7DMCXMZM0pn-5KeVASdxdnC1KNbHgd38](https://studio.code.org/projects/gamelab/ZiihJxNoCeb7DMCXMZM0pn-5KeVASdxdnC1KNbHgd38)

When it is run, we get this error message: ERROR: Line: 32: Error: Error: overlap can only be checked between sprites or groups

When I looked up this error message I got this: The message “ **overlap only** works with **sprites** ” most likely means that the program was expecting a **sprite** , but got something else. So, something that the programmer intended to be a **sprite** was, in fact, not a **sprite**.Mar 5, 2019

To me, his code looks good. Any help/suggestions? Thank you!

---

<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 21, 2020, 2:45pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574/2 "2020-10-21T14:45:54Z")

</div>

Hi @jennifer.hemry,

I saw a few things that appear to have fixed it for me:

- In line 13, coin scale is set to .5 and it gives an error. Changing it to 0.5 eliminated the error for me.
- I tried to figure out why there was an overlap error in line 32 and it looked good to me. I read below to see if anything else was odd, and noticed they were incrementing “coin” in line 33. Coin is a sprite, not a regular variable, so that was a little odd. I thought maybe they meant to increment score & changed it. That seems to make it work for me.

Does that help? Does it work on your end if you make those changes?

–Michael K.

---

<div class="post-metadata">

**Author:** ![jennifer.hemry](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jennifer.hemry/32/4710_2.png) [@jennifer.hemry](https://forum.code.org/u/jennifer.hemry)\
**Post date:** [October 21, 2020, 3:07pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574/3 "2020-10-21T15:07:08Z")

</div>

YEAH! That worked! 🙂 LOL! Can’t believe I missed that. Looking at too much coin today.

---

<div class="post-metadata">

**Author:** ![jennifer.hemry](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jennifer.hemry/32/4710_2.png) [@jennifer.hemry](https://forum.code.org/u/jennifer.hemry)\
**Post date:** [October 21, 2020, 3:07pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574/4 "2020-10-21T15:07:26Z")

</div>

OOPS! Too much code not too much coin. I’m losing it.

---

<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 21, 2020, 4:41pm UTC](https://forum.code.org/t/code-help-for-lesson-20/33574/5 "2020-10-21T16:41:02Z")

</div>

No worries – more often than not, it’s silly little things that make the biggest problems. Glad to help 🙂
