# Settings Extension not working

**URL:** <https://forum.makecode.com/t/settings-extension-not-working/20170>\
**Category:** Help\
**Created:** [May 25, 2023, 3:49pm UTC](https://forum.makecode.com/t/settings-extension-not-working/20170 "2023-05-25T15:49:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdf1](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sdf1](https://forum.makecode.com/u/sdf1)\
**Post date:** [May 25, 2023, 3:49pm UTC](https://forum.makecode.com/t/settings-extension-not-working/20170/1 "2023-05-25T15:49:22Z")

</div>

I have a setting variable thingy called “mapNumber”. I try to change it each time to change the background map for my game, but it doesn’t work. Why?

> **[Super Smash Bros Ripoff](https://arcade.makecode.com/S09887-77711-45591-34994)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [May 25, 2023, 4:04pm UTC](https://forum.makecode.com/t/settings-extension-not-working/20170/2 "2023-05-25T16:04:57Z")

</div>

It’s because you’re starting the game by setting the setting to 1, so it’s never equal to any other number by the time the `if` statements roll around. Try this:

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

---

<div class="post-metadata">

**Author:** ![sdf1](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sdf1](https://forum.makecode.com/u/sdf1)\
**Post date:** [May 25, 2023, 8:23pm UTC](https://forum.makecode.com/t/settings-extension-not-working/20170/3 "2023-05-25T20:23:32Z")

</div>

I don’t think it worked. Is this a glitch?

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [May 25, 2023, 8:44pm UTC](https://forum.makecode.com/t/settings-extension-not-working/20170/4 "2023-05-25T20:44:14Z")

</div>

No, it’s not a glitch, I just missed a different piece of code that was also causing the problem.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/88b94f1b3b162600c08dce51c88f27b13dee0bed.png)  
Try switching the order of the `game over` blocks and the `settings` blocks like this. Before, you were making the game end _before_ you changed the settings, which reset the game before the settings blocks could be activated. I think really any block that is declared after `reset game` or `game over` blocks will not be declared.
