# Failed to cast null

**URL:** <https://forum.makecode.com/t/failed-to-cast-null/27125>\
**Category:** Help\
**Created:** [February 20, 2024, 8:29pm UTC](https://forum.makecode.com/t/failed-to-cast-null/27125 "2024-02-20T20:29:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LildubK9](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@LildubK9](https://forum.makecode.com/u/LildubK9)\
**Post date:** [February 20, 2024, 8:29pm UTC](https://forum.makecode.com/t/failed-to-cast-null/27125/1 "2024-02-20T20:29:07Z")

</div>

I’m working on a video game with makecode arcade. It’s not finished yet because when I try starting the first level it says “SIM error: failed to cast NULL” I checked if I had anything trying to to some stuff to sprites that don’t exist yet and couldn’t find any. I used debug mode and it said something was wrong with my on button A pressed functions. Feel free to change anything and send it to me. Sorr the link isn’t clickable.

> **[Blood Moon](https://arcade.makecode.com/28709-96703-22744-44748)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![randomDUck](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@randomDUck](https://forum.makecode.com/u/randomDUck)\
**Post date:** [June 11, 2025, 7:58pm UTC](https://forum.makecode.com/t/failed-to-cast-null/27125/2 "2025-06-11T19:58:03Z")

</div>

could be the order of the code
