# I need help with my code.

**URL:** <https://forum.makecode.com/t/i-need-help-with-my-code/16672>\
**Category:** Help\
**Tags:** game\
**Created:** [November 29, 2022, 7:23pm UTC](https://forum.makecode.com/t/i-need-help-with-my-code/16672 "2022-11-29T19:23:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostgames](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@ghostgames](https://forum.makecode.com/u/ghostgames)\
**Post date:** [November 29, 2022, 7:23pm UTC](https://forum.makecode.com/t/i-need-help-with-my-code/16672/1 "2022-11-29T19:23:14Z")

</div>

My code doesn’t want to work. Every time I put in my code it keeps disabling it. Is there anything i can do?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [November 29, 2022, 7:41pm UTC](https://forum.makecode.com/t/i-need-help-with-my-code/16672/2 "2022-11-29T19:41:50Z")

</div>

Can you post a screenshot of what you’re seeing?

There are two cases where MakeCode disables blocks:

1. When statement blocks are placed outside of an event block
2. When two identical events are placed on the workspace

For case #1, all statement blocks need to be within an event blocks (the blocks with a “mouth”). If they are placed directly on the workspace they will get disabled like this:

![outside-event](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2ab528d114386167709906085658ddfd82abeaf0.gif)

For case #2, some events (like the controller events) aren’t allowed to be duplicated on the workspace; each instance of the block needs to have at least one argument that is different.

For example, I can have an “on A button pressed” block and an “on B button pressed” block on the workspace because the button argument is different. Similarly, I can have an “on B button pressed” and an “on B button released” event because the pressed/released argument is different. However, I can’t have two “on B button pressed” events because both arguments are the same:

![duplicate-event](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a2cf7dfdff13fcae02a72718d712697cb04ce7dc.gif)
