# HELP MY CODE PLEASE

**URL:** <https://forum.makecode.com/t/help-my-code-please/29013>\
**Category:** Help\
**Created:** [May 29, 2024, 10:36pm UTC](https://forum.makecode.com/t/help-my-code-please/29013 "2024-05-29T22:36:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [May 29, 2024, 10:36pm UTC](https://forum.makecode.com/t/help-my-code-please/29013/1 "2024-05-29T22:36:20Z")

</div>

@richard @MakeCode @NotRichard I’ve encountered a bug saying I have an error but I cant find it please help me I don’t want to lose it

> **[soper mareo bors](https://arcade.makecode.com/S73922-74764-74346-51798)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hassan/32/1457_2.png) [@hassan](https://forum.makecode.com/u/hassan)\
**Post date:** [May 29, 2024, 11:28pm UTC](https://forum.makecode.com/t/help-my-code-please/29013/2 "2024-05-29T23:28:31Z")

</div>

Hello @mcodez,

If you press the `Toggle debug mode` button under the simulator, you can run your code to see where the error is:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e5ea64e24796b7dae0bef196680c1ef6f48cced8.png)  
Press the green play button until you hit the error:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a85790714d506a50fc22a6ecc612d7b30964ced4.png)  
Doing this you will see that the error is located in your `On Start` block:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1bcbd92b322a017025da6a274f3edfb1beb45aaa.png)

The error is telling us that the `(player 1) sprite` is null, meaning it was never set. What we need is a `set (player 1) sprite to` block.

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

When you add the new block, you can set the sprite to the asset you already created by clicking on `My Assets` in the sprite editor:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/289d78dd2320a5e597abb66b769e45a172ac4da6.png)

Once you add the new block, your game should run! Make sure to create the sprite for player 2 as well 🙂.
