# Stupid error

**URL:** https://forum.makecode.com/t/stupid-error/19799
**Category:** Help
**Created:** [May 9, 2023, 4:21pm UTC](https://forum.makecode.com/t/stupid-error/19799 "2023-05-09T16:21:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [May 9, 2023, 4:21pm UTC](https://forum.makecode.com/t/stupid-error/19799/1 "2023-05-09T16:21:20Z")

</div>

Hi, i am making a game and needs some help with a stupid error. The error only occurs when i try to convert to blocks.

> Line 1: Cannot read properties of undefined(reading ‘length’)

The thing is, that the first line is:

```JS
namespace SpriteKind {

```

So there sholdn’t really be anytthing wrong with the first line, and when i go in debug mode. There is no error, it **only** happens when i try converting to blocks. The error persist when i try copying the code over to a seperate game.

---

<div class="post-metadata">

### Author: ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)
#### Post date: [May 9, 2023, 4:22pm UTC](https://forum.makecode.com/t/stupid-error/19799/2 "2023-05-09T16:22:01Z")

</div>

@Samsano Would you mind sharing a link to your project so we can try to help debug?

---

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [May 9, 2023, 7:25pm UTC](https://forum.makecode.com/t/stupid-error/19799/3 "2023-05-09T19:25:55Z")

</div>

> **[Tenormalia,](https://arcade.makecode.com/41612-66998-57698-57179)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

here

---

<div class="post-metadata">

### Author: ![Destroyer2](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/destroyer2/32/8758_2.png) [@Destroyer2](https://forum.makecode.com/u/Destroyer2)
#### Post date: [May 9, 2023, 8:31pm UTC](https://forum.makecode.com/t/stupid-error/19799/4 "2023-05-09T20:31:46Z")

</div>

OK @Samsano I see your problem. I have made the game to show the cursor and edited the game but here is the thing YOU CANNOT COPY SPRITE CODES TO OTHER PROGRAMS. I really sorry If your upset about that just duplicate the program and make a new one there. Here is the one That I modified

[BUG](https://arcade.makecode.com/S34466-27394-34591-86862)

---

<div class="post-metadata">

### Author: ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)
#### Post date: [May 10, 2023, 5:10pm UTC](https://forum.makecode.com/t/stupid-error/19799/5 "2023-05-10T17:10:04Z")

</div>

what i do to not have duplecate sprites in the game i name all the sprites in Hex code  
for exemple  
insted of naming a sprite “TempImg” i name it “ID54656D70496D67” or ID + 54 65 6D 70 49 6D 67 witch is hex for TempImg

---

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [May 12, 2023, 5:20pm UTC](https://forum.makecode.com/t/stupid-error/19799/6 "2023-05-12T17:20:33Z")

</div>

What does this have to do with my question?

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [May 12, 2023, 5:31pm UTC](https://forum.makecode.com/t/stupid-error/19799/7 "2023-05-12T17:31:33Z")

</div>

Ah hm, looks like there’s a ts-\>blocks decompiler bug this is hitting when returning just the top level variable directly in a `pauseUntil`; it’s annoying but until it’s fixed easiest work around is just to return !!variable; here’s a link as an example:

> **[Tenormalia,](https://arcade.makecode.com/90628-26480-41386-69675)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

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