# Code.org error i have

**URL:** <https://forum.code.org/t/code-org-error-i-have/34201>\
**Category:** Uncategorized\
**Created:** [February 8, 2021, 6:13am UTC](https://forum.code.org/t/code-org-error-i-have/34201 "2021-02-08T06:13:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![levinsonfamily](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@levinsonfamily](https://forum.code.org/u/levinsonfamily)\
**Post date:** [February 8, 2021, 6:13am UTC](https://forum.code.org/t/code-org-error-i-have/34201/1 "2021-02-08T06:13:48Z")

</div>

> **[Check out what I made](https://studio.code.org/projects/applab/c2hQ_pmEgybzdBiHSI1tdG0ppK01_W69oHK2qYNxK2o)**
>
> I wrote the code myself with Code.org

Hi, It keeps saying I have a type error and that my substring is not a function and I am unable to fix this. It says this error on 3 lines any idea how to fix it?

---

<div class="post-metadata">

**Author:** ![gjschmidt](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/gjschmidt/32/4922_2.png) [@gjschmidt](https://forum.code.org/u/gjschmidt)\
**Post date:** [February 8, 2021, 10:46pm UTC](https://forum.code.org/t/code-org-error-i-have/34201/2 "2021-02-08T22:46:33Z")

</div>

When substring is not a function, it implies that the thing you are working with isn’t a string. I recommend looking at your Data Source. If the field you getting isn’t in “” then it’s not a string and is probably a number and you should use it as a number.
