# Error for Menu Screen

**URL:** https://forum.makecode.com/t/error-for-menu-screen/29404
**Category:** Help
**Tags:** game
**Created:** [June 23, 2024, 2:41am UTC](https://forum.makecode.com/t/error-for-menu-screen/29404 "2024-06-23T02:41:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![GotMilk](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@GotMilk](https://forum.makecode.com/u/GotMilk)
#### Post date: [June 23, 2024, 2:41am UTC](https://forum.makecode.com/t/error-for-menu-screen/29404/1 "2024-06-23T02:41:55Z")

</div>

Hi, im making a main menu for my game and my entire thing has an error. I dont know how to fix it, and i already tried to pause everything until level = 1 but i dont think it is solving the main issue.

GameLink: [https://arcade.makecode.com/S47955-72354-17877-44590](https://arcade.makecode.com/S47955-72354-17877-44590)

---

<div class="post-metadata">

### Author: ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)
#### Post date: [June 23, 2024, 4:23am UTC](https://forum.makecode.com/t/error-for-menu-screen/29404/2 "2024-06-23T04:23:37Z")

</div>

_One_ of your issues is the way you’re using the “pause until” block!

> **Here's an example**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/2/22069eeb94cbc412684a1b3cc8c2e458d3469f96.png)

> **And here's how it should be**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/9/8910ce97a0dc88a5b6f25be979f829eba1caf5dc.png)

_Another_ problem is a lot of your event handlers are missing the same condition. This means that when you try to press A to start the game, it will try to look for the sword to attack / do an animation which crashes the game. 😣

> **Here's the code that crashes**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/7/67af7b97f588091d2b76b1886957dc574fa013ea.png)

> **And here's the fixed one**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/e/0e062c10b697c120b77609485de2e5af4cec9e70.png)

Keep in mind, I added this IF statement to _ **multiple** _ blocks! You can see the difference in **[this](https://arcade.makecode.com/S08299-88292-91037-14931)** fixed version of your game!

Hope this helps, and **happy coding!** 😁

---

<div class="post-metadata">

### Author: ![GotMilk](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@GotMilk](https://forum.makecode.com/u/GotMilk)
#### Post date: [June 23, 2024, 7:14am UTC](https://forum.makecode.com/t/error-for-menu-screen/29404/3 "2024-06-23T07:14:41Z")

</div>

Thanks! I have one question should I continue to use this method to make menus or would switching to the mini menu extension be better in the long run. (I plan to add inventory and stuff)

---

<div class="post-metadata">

### Author: ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)
#### Post date: [June 23, 2024, 7:01pm UTC](https://forum.makecode.com/t/error-for-menu-screen/29404/4 "2024-06-23T19:01:47Z")

</div>

While it’s always **better** to _tinker_, _mess around with code_ and _do your own stuff_, that’s just useful for **learning** and slowly **building better habits** and more code _understanding_. 🧑‍🎓

Once you have a _good grasp_ of how things work, extensions like the “mini menu” one are _very useful_ for **saving time** and **not having to worry about polishing / bugs!** 🤩
