# Why is this an error

**URL:** <https://forum.makecode.com/t/why-is-this-an-error/40384>\
**Category:** Help\
**Created:** [November 11, 2025, 7:03pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384 "2025-11-11T19:03:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 11, 2025, 7:03pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/1 "2025-11-11T19:03:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 11, 2025, 7:45pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/2 "2025-11-11T19:45:11Z")

</div>

We need to see more code than that. You can click on the warning sign to see what it says. If you can’t figure it out you can share the project and we’ll help!

Most likely it’s because either “arrow” is not an array of sprites or because “spriteSpeed” is not a number. Actually, I think the “spriteSpeed” variable would be highlighted as well if it was the issue, though I may be mistaken.

---

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 11, 2025, 10:18pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/3 "2025-11-11T22:18:01Z")

</div>

I need the actual sprite instead of the image of the sprite

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 12, 2025, 4:19am UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/4 "2025-11-12T04:19:52Z")

</div>

You can put sprites into arrays just fine. I do it all the time. Please share your code so I can actually help!

---

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 15, 2025, 7:19pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/5 "2025-11-15T19:19:58Z")

</div>

[https://arcade.makecode.com/S74355-85178-45520-63363](https://arcade.makecode.com/S74355-85178-45520-63363)

---

<div class="post-metadata">

**Author:** ![Rune](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rune/32/18951_2.png) [@Rune](https://forum.makecode.com/u/Rune)\
**Post date:** [November 16, 2025, 11:50pm UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/6 "2025-11-16T23:50:31Z")

</div>

Well, I fixed the error, but…

> **[Arrow Mainia (Uhhhh.)](https://arcade.makecode.com/65847-45418-75623-93489)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

You should probably wait for woofwoof’s reply he’s good at this.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 17, 2025, 12:01am UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/7 "2025-11-17T00:01:12Z")

</div>

![IMG_0751](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/5/657550500346cf59fdc7dc46bdd5ddeb53d10c43.jpeg)  
That second line of code is the one that creates the sprite. You’ll want that to be above the one that moves the sprite. A sprite needs to exist before you can do something to it.

Well, once that is fixed it will be creating a new sprite every time. What you need is to get random from an array of those already created sprites, like this:

 ![IMG_0753](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/e/5/e52eddb1ee11b3ebaba47553aa3c954934212e4c.jpeg)

Here’s the link to my version:

> **[Arrow Mainia](https://arcade.makecode.com/S04907-37003-22636-82633)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 17, 2025, 12:22am UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/8 "2025-11-17T00:22:41Z")

</div>

Would have been really funny if mine was approved first lol

@AlexK that’s alright. Just do your best! You’re already a saint for approving posts on the weekends! 🫶

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [November 17, 2025, 12:23am UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/9 "2025-11-17T00:23:44Z")

</div>

I do try to approve posts in the right order. 😃 The new review screens in Discourse seem to select posts at random, though, which is a bit … frustrating.

---

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 18, 2025, 3:43am UTC](https://forum.makecode.com/t/why-is-this-an-error/40384/10 "2025-11-18T03:43:32Z")

</div>

Thank you very much
