# Type 'undefined\[\]' is not assignable to type 'number'

**URL:** <https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868>\
**Category:** Help\
**Created:** [October 13, 2020, 1:15pm UTC](https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868 "2020-10-13T13:15:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 13, 2020, 1:15pm UTC](https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868/1 "2020-10-13T13:15:36Z")

</div>

> **[Decked Out](https://arcade.makecode.com/45394-44174-55748-80228)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I was working on a small project when Arcade started refusing to run the project. I scanned my code for any exclamation marks but nothing was found. Thinking it was just a small problem like a tile was undefined or something, I quickly switched to JavaScript mode. There I found this:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e128f7218878900a350536925c6c4e941f4061bf.png)

There were 6 errors. Intellisense said `Type 'undefined[]' is not assignable to type 'number'.` for each one. I just got this after modifying something completely unrelated.

Any idea why this happened?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 13, 2020, 1:18pm UTC](https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868/2 "2020-10-13T13:18:07Z")

</div>

Ah, never mind. Replacing the `[]` in the problematic statements with `null` did the trick.

Now I can go back to my blocks and start moving everything back, because Arcade moved everything around again!

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 14, 2020, 5:28pm UTC](https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868/3 "2020-10-14T17:28:00Z")

</div>

I saw the same thing happen yesterday. I’m guessing there was a glitch in the editor. I can’t remember exactly what I was doing at the time, but I think I defined an array within a function in javascript, went to blocks, and the game didn’t run, and when I went back I saw the same errors. Luckily it happened when I had just started changing things, so I could just revert those changes in GitHub.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 14, 2020, 6:19pm UTC](https://forum.makecode.com/t/type-undefined-is-not-assignable-to-type-number/3868/4 "2020-10-14T18:19:53Z")

</div>

Yes, this is absolutely a bug. Usually refreshing the page (in the blocks editor) fixes it
