# Bug in my game that i don't understand at all

**URL:** https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571
**Category:** Help
**Created:** [November 20, 2025, 10:32pm UTC](https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571 "2025-11-20T22:32:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [November 20, 2025, 10:32pm UTC](https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571/1 "2025-11-20T22:32:43Z")

</div>

[![imagen](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/9/c98a791f969f90960a69c155fabda33f3482d507.png)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/9/c98a791f969f90960a69c155fabda33f3482d507.png "imagen")

[imagen277×469 40.6 KB](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/9/c98a791f969f90960a69c155fabda33f3482d507.png "imagen")

(MODS: No share link because i don’t want to share my game yet. Issue is also completely isolated from the game)

When this function runs in my game, the game immediately freezes. As you can see, i have made sure it does not interfere with other tasks, and the loop only ever splashes “0”. After that, the game keeps running for a few miliseconds and then freezes. It also shouldn’t be running infinitely, and it isn’t since otherwise more things would be splashed. Here’s also a picture of the choices array:

[![imagen](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/2/b257176b1f65c20a5a43418da9345f25e64b2c97.png)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/2/b257176b1f65c20a5a43418da9345f25e64b2c97.png "imagen")

[imagen562×302 23.9 KB](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/2/b257176b1f65c20a5a43418da9345f25e64b2c97.png "imagen")

I don’t really know what to do, so i am asking for help in the forums. Thanks in advance.

---

<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 21, 2025, 3:50am UTC](https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571/2 "2025-11-21T03:50:34Z")

</div>

That “includes” block cannot tell the difference between two mini menu elements. It will always think they are the same. You could try using the “get and remove random value” block instead, then you wouldn’t have to worry about including the same option twice. If you add the elements you removed back into the array (or just copied that “set [choices] to…” block into the bottom of the choices function) then the array will not actually lose the elements every time.

---

<div class="post-metadata">

### Author: ![codeFan413](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codefan413/32/26855_2.png) [@codeFan413](https://forum.makecode.com/u/codeFan413)
#### Post date: [November 21, 2025, 4:36pm UTC](https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571/3 "2025-11-21T16:36:16Z")

</div>

Hey, a new issue has came up, which makes me have to share the game.

> **[space sucks v7](https://arcade.makecode.com/10686-73428-15425-98260)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

After getting an upgrade, the game stops spawning enemies and scaling the game, except for heart aliens, this shouldn’t happen since notchoosing is no longer false. Can you also help with this?

---

<div class="post-metadata">

### Author: ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)
#### Post date: [November 23, 2025, 12:13am UTC](https://forum.makecode.com/t/bug-in-my-game-that-i-dont-understand-at-all/40571/4 "2025-11-23T00:13:28Z")

</div>

What could be happening is that the bossactive variable becomes true as soon as the upgrade time thing appears, since there is code that repels enemy creation when it is true, enemies won’t spawn.

Try setting bossactive to false after the upgrade sequence.
