# Multiple on start blocks

**URL:** <https://forum.makecode.com/t/multiple-on-start-blocks/381>\
**Category:** Maker\
**Created:** [July 29, 2019, 5:24pm UTC](https://forum.makecode.com/t/multiple-on-start-blocks/381 "2019-07-29T17:24:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)\
**Post date:** [July 29, 2019, 5:24pm UTC](https://forum.makecode.com/t/multiple-on-start-blocks/381/1 "2019-07-29T17:24:02Z")

</div>

I noticed the editor allows multiple `on start` blocks to be created. If you do this the editor appears to flash an exclamation mark warning triangle on first statement _briefly_ and the ones that won’t execute get marked with a diamond background pattern. Precedence might be determined by vertical placement? If you hover over the patterned blocks this text appears:

> This block is disabled and will not run. Attach this block to an event to enable it.

Is that the best message for the typical MakeCode programmer?

The simulator allows the program to be executed with this erroneous condition.

Has there been any discussion on allowing multiple `on start` blocks? Scratch does allows multiple blocks for the equivalent event.

---

<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:** [July 29, 2019, 5:37pm UTC](https://forum.makecode.com/t/multiple-on-start-blocks/381/2 "2019-07-29T17:37:29Z")

</div>

The same thing happens when, say, you have two event handlers for pressing the **A** button in MakeCode Arcade. One of them gets disabled, because you can only have one function that handles that event.

If you switch back-and-forth between the Blocks view and the JavaScript view, you can see what happens to the `on start` code: It’s the top-level code for your program, not an event handler. You can’t have multiple `on start` blocks because the code doesn’t get placed inside of a function or anything like that.

You _can_ have multiple `on update` blocks, though, because those get handled differently.
