# "Unable to convert code to Javascript"

**URL:** <https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957>\
**Category:** Help\
**Created:** [May 5, 2020, 1:04pm UTC](https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957 "2020-05-05T13:04:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gnitz/32/927_2.png) [@gnitz](https://forum.makecode.com/u/gnitz)\
**Post date:** [May 5, 2020, 1:04pm UTC](https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957/1 "2020-05-05T13:04:58Z")

</div>

Hi, I was working on making some updates to my game when all of a sudden the simulator would not reflect any changes I was making to the blocks. When making changes to the blocks, a brief message “Sorry, we are unable to convert this program” is displayed. When I try to go to the Javascript tab, I get the below error.

 ![jsError](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/4ed406d4a95631d3c5826217183020823a101313.jpeg)

I did a quick search on the forum help section and I’ve found similar issues reported by other users, but I’m not quite sure where I can start troubleshooting.

This is the link to the version I was working on - [https://makecode.com/\_LYkDUJJfV7q9](https://makecode.com/_LYkDUJJfV7q9)

---

<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:** [May 5, 2020, 6:20pm UTC](https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957/2 "2020-05-05T18:20:02Z")

</div>

I think you have uncovered a bug in MakeCode. To work around it, you can remove the argument you are passing to “on game update interval”. In general, you only ever want to put a number in that block. The interval argument is only executed once so it will just take whatever the first value is.

Instead, you can use `forever()` and `pause()` in the loops category. In other words, instead of this code:

 ![Screen Shot 2020-05-05 at 11.18.37 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/c39d45d1096c0066c1ea072d7e0492dcede5ff0a.png)

Do something more like this:

 ![Screen Shot 2020-05-05 at 11.19.03 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/5294d5d55d1340c1d5af8a29df5c0cecc899f552.png)

---

<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:** [May 5, 2020, 6:27pm UTC](https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957/3 "2020-05-05T18:27:25Z")

</div>

And I’ve reported this bug in our issue tracker here: [https://github.com/microsoft/pxt-arcade/issues/1879](https://github.com/microsoft/pxt-arcade/issues/1879)

Thanks for finding it!

---

<div class="post-metadata">

**Author:** ![gnitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gnitz/32/927_2.png) [@gnitz](https://forum.makecode.com/u/gnitz)\
**Post date:** [May 5, 2020, 7:05pm UTC](https://forum.makecode.com/t/unable-to-convert-code-to-javascript/1957/4 "2020-05-05T19:05:59Z")

</div>

Hi Richard, thanks for looking into this. I’ll make the changes you’ve recommended.

Edit: I’ve made changes to the loop and everything seems to work just fine. Many thanks again!
