# Help needed please my game wont work

**URL:** <https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021>\
**Category:** Help\
**Created:** [October 6, 2024, 8:20pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021 "2024-10-06T20:20:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bella\_luvcatz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bella_luvcatz/32/21857_2.png) [@bella\_luvcatz](https://forum.makecode.com/u/bella_luvcatz)\
**Post date:** [October 6, 2024, 8:20pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/1 "2024-10-06T20:20:15Z")

</div>

I have to turn in an assignment but the flag to change levels to work properly, plus it changes all the way to the boss

---

<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:** [October 6, 2024, 8:20pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/2 "2024-10-06T20:20:27Z")

</div>



---

<div class="post-metadata">

**Author:** ![bella\_luvcatz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bella_luvcatz/32/21857_2.png) [@bella\_luvcatz](https://forum.makecode.com/u/bella_luvcatz)\
**Post date:** [October 6, 2024, 8:20pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/3 "2024-10-06T20:20:17Z")

</div>

I think I’m kinda late for this chat but my game wont work  
[the levels wont work](https://arcade.makecode.com/S57899-72338-86680-07644)

---

<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:** [October 6, 2024, 8:22pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/4 "2024-10-06T20:22:35Z")

</div>



---

<div class="post-metadata">

**Author:** ![George-LJH](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/george-ljh/32/13810_2.png) [@George-LJH](https://forum.makecode.com/u/George-LJH)\
**Post date:** [October 7, 2024, 2:34am UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/5 "2024-10-07T02:34:53Z")

</div>

What do you mean it won’t work? Looks fine to me…

---

<div class="post-metadata">

**Author:** ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)\
**Post date:** [October 7, 2024, 4:47pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/6 "2024-10-07T16:47:21Z")

</div>

I found the problem!  
This block  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/a/6aae13ba1b5e972a61cf9a1344ce6cf385584eb9.png)  
when you hit the flag has enough time to do 2 times setting the level to the boss level.  
I couldn’t find a good fix but at least we know the problem now.

---

<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:** [October 7, 2024, 4:49pm UTC](https://forum.makecode.com/t/help-needed-please-my-game-wont-work/31021/7 "2024-10-07T16:49:15Z")

</div>

For starters, the reason it sends you straight to the last level is because you spawn in level 2 already touching the end flag, sending you to the next level. This happens because you didn’t put the “place (princess) on top of random (light blue tile)” block in the setleveltilemap function (it should go at the end!). Hope this helps!
