# Type Error: Number is not a function

**URL:** <https://forum.code.org/t/type-error-number-is-not-a-function/24306>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-3, csd-unit-3-lesson-22\
**Created:** [January 24, 2019, 8:17pm UTC](https://forum.code.org/t/type-error-number-is-not-a-function/24306 "2019-01-24T20:17:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindyw](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@mindyw](https://forum.code.org/u/mindyw)\
**Post date:** [January 24, 2019, 8:17pm UTC](https://forum.code.org/t/type-error-number-is-not-a-function/24306/1 "2019-01-24T20:17:07Z")

</div>

My student can’t get this error to go away. Please help! Here is the code: [https://studio.code.org/projects/gamelab/TCMmFFs7KPxnj6Yjuls6ZqzxvHP7kl07VyUyLkeSClk](https://studio.code.org/projects/gamelab/TCMmFFs7KPxnj6Yjuls6ZqzxvHP7kl07VyUyLkeSClk)

Thanks!

---

<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:** [January 25, 2019, 5:51pm UTC](https://forum.code.org/t/type-error-number-is-not-a-function/24306/2 "2019-01-25T17:51:55Z")

</div>

Hi Mindy,

This type of error means that the program is treating something like a function when it’s actually a number. Usually this happens because there was a function name that also got used as a variable name, and a number was stored into the variable. In this case, that function/variable is `score`.

`score` is defined is a function in line 66, but it’s also being used as a number in lines 2 and 100. Line 100 has a warning telling the student that ‘score’ is already being used as a function. When the function `score` is called, `score` has already been redefined as a number, and the program can’t run the function.

To fix this problem, the student should used different names for the `score` function and `score` variable`.

Elizabeth
