# Block Menu Index

**URL:** <https://forum.makecode.com/t/block-menu-index/5188>\
**Category:** Help\
**Created:** [December 21, 2020, 10:19pm UTC](https://forum.makecode.com/t/block-menu-index/5188 "2020-12-21T22:19:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [December 21, 2020, 10:19pm UTC](https://forum.makecode.com/t/block-menu-index/5188/1 "2020-12-21T22:19:19Z")

</div>

Using the BlockMenu extension, there’s both option and index. What is the index in the block menu for and how do you use it?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [December 21, 2020, 11:21pm UTC](https://forum.makecode.com/t/block-menu-index/5188/2 "2020-12-21T23:21:02Z")

</div>

So you know how you passed in an array like this to display:

```auto
["Option 1", "Option 2", "Option 3]

```

If you selected `Option 1`, the index would be `0`, because you selected the 0th element. The selected option would still be `Option 1`. But if you selected `Option 3`, the index woukd be `2` while the option would be `Option 3`.

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [December 23, 2020, 5:08pm UTC](https://forum.makecode.com/t/block-menu-index/5188/3 "2020-12-23T17:08:44Z")

</div>

The explanation from @UnsignedArduino is correct; the index of the first menu option is 0. So the indexes are: 0, 1, 2 for the three items. Where you might use it could be for the following:

> **[block menu index](https://arcade.makecode.com/53310-66920-12644-95676)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

There is a bug in my code when trying to update the text sprite, but this should give you the general idea.

---

<div class="post-metadata">

**Author:** ![Raed438](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/raed438/32/24469_2.png) [@Raed438](https://forum.makecode.com/u/Raed438)\
**Post date:** [March 17, 2021, 6:46am UTC](https://forum.makecode.com/t/block-menu-index/5188/4 "2021-03-17T06:46:55Z")

</div>

The block menu is in extensions, how did you get that one

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 17, 2021, 2:54pm UTC](https://forum.makecode.com/t/block-menu-index/5188/5 "2021-03-17T14:54:00Z")

</div>

Import the block extension menu with this link:

> **[riknoll/arcade-custom-menu](https://github.com/riknoll/arcade-custom-menu)**
>
> An extension for creating and displaying menus in MakeCode Arcade

* * *

**SHAMELESS SELF PROMOTION**  
I have curated a list of extensions [here](https://github.com/UnsignedArduino/Awesome-Arcade-Extensions).

---

<div class="post-metadata">

**Author:** ![DahbixLP](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dahbixlp/32/4760_2.png) [@DahbixLP](https://forum.makecode.com/u/DahbixLP)\
**Post date:** [March 17, 2021, 3:03pm UTC](https://forum.makecode.com/t/block-menu-index/5188/6 "2021-03-17T15:03:11Z")

</div>

There is a link which you have to put into the search bar above the already existing extensions! So exactly underneath HERE!  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/8aa9911c3ea76a5f24bed1b4d513091cfe4038ed.png)  
Then copy this link! (ctrl c to copy and ctrl v to paste (or strg on other keyboards))  
Enter this link: riknoll/arcade-custom-menu like this

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/4d57d5866997f1ad370a4665d5ba06323db81665.png)  
Then click on the seach button or enter! Then this should show up!  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/5e5e5f07a833f191a244798f26c889323273d670.png)  
Else if it looks like this you did it wrong…  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2e5d717490f6804cebad94f1d4d7d8890144e051.png)  
That means that you entered the wrong link! Often there is spaces between things! Those have to be removed! If the block-menu extension does show up just click on it to get it! Do you need an explenation on how to use it? Then just like this post! @Raed438  
Also this extension is made by @richard (riknoll is his github name(github is basically the forum but way bigger! There is more or less every coder there! Not just the Makecoders! So people who use other engines like Unity, Unreal Engine or others! These might look better but are way harder…) I hope this helps you out! (Like this post if you need a further step by step explaination ob how to make a menu work and do something)  
Also welcome to Makecode!
