# Unit 3, Lesson 22 Error in code...WHY?

**URL:** <https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346>\
**Category:** CS Discoveries\
**Created:** [November 19, 2018, 12:22pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346 "2018-11-19T12:22:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hensleyn](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@hensleyn](https://forum.code.org/u/hensleyn)\
**Post date:** [November 19, 2018, 12:22pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346/1 "2018-11-19T12:22:59Z")

</div>

My student is getting an error in his code when making a game. I don’t know why, can someone help?

ERROR: Line: 146: TypeError: a.setDefaultCollider is not a function

---

<div class="post-metadata">

**Author:** ![jason.whiting](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jason.whiting](https://forum.code.org/u/jason.whiting)\
**Post date:** [November 20, 2018, 4:36pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346/2 "2018-11-20T16:36:07Z")

</div>

Can I see the code? But my first guess is the function has not been defined.

---

<div class="post-metadata">

**Author:** ![elizabeth\_admin](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@elizabeth\_admin](https://forum.code.org/u/elizabeth_admin)\
**Post date:** [November 20, 2018, 5:14pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346/3 "2018-11-20T17:14:14Z")

</div>

I ran the code, but I didn’t get an error. Did the student fix it?

Elizabeth

---

<div class="post-metadata">

**Author:** ![hensleyn](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@hensleyn](https://forum.code.org/u/hensleyn)\
**Post date:** [November 20, 2018, 5:28pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346/4 "2018-11-20T17:28:08Z")

</div>

We fixed it yesterday, we found that he forgot to put " " in. 🙂 I couldn’t delete the topic so it stayed here. Thanks for the help, however!

---

<div class="post-metadata">

**Author:** ![elizabeth\_admin](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@elizabeth\_admin](https://forum.code.org/u/elizabeth_admin)\
**Post date:** [November 20, 2018, 6:16pm UTC](https://forum.code.org/t/unit-3-lesson-22-error-in-code-why/22346/5 "2018-11-20T18:16:06Z")

</div>

Congrats on the successful debugging!
