# Internal Error Generating code for blocks, how to fix?

**URL:** <https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223>\
**Category:** Questions about Thunkable X\
**Created:** [November 27, 2021, 5:58am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223 "2021-11-27T05:58:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![d34thbychocl4t3](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@d34thbychocl4t3](https://community.thunkable.com/u/d34thbychocl4t3)\
**Post date:** [November 27, 2021, 5:58am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/1 "2021-11-27T05:58:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/0/d0364cceb8ea40a8d030322e0bb2318d4bf9f28f.png)  
This is the code i’m working on. Basically what I want it to do is pop up an alert, if ‘yes’ is clicked, stop the loop, otherwise keep on going. However, when I connect the ‘break out of the loop’ block, an Internal Error shows up. How can I fix this?

---

<div class="post-metadata">

**Author:** ![d34thbychocl4t3](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@d34thbychocl4t3](https://community.thunkable.com/u/d34thbychocl4t3)\
**Post date:** [November 27, 2021, 6:08am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/2 "2021-11-27T06:08:15Z")

</div>

After a bit of testing it appears to be because it was placed inside the alert block. I’ve managed a workaround for the time being but I would be grateful to know the reason for the bug in the first place so I can avoid it.

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [November 27, 2021, 6:15am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/3 "2021-11-27T06:15:46Z")

</div>

Would you mind sharing the link of your project?

---

<div class="post-metadata">

**Author:** ![d34thbychocl4t3](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@d34thbychocl4t3](https://community.thunkable.com/u/d34thbychocl4t3)\
**Post date:** [November 27, 2021, 6:17am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/4 "2021-11-27T06:17:48Z")

</div>

I don’t think I can, as this is for a competition and has some api keys and stuff. But if you need any details I can give em to you.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 27, 2021, 6:21am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/5 "2021-11-27T06:21:38Z")

</div>

I’m not sure if you can break out of a `forever` loop. I’ve never tried. But the error could be because there’s not a loop block (other than `forever`) for it to break out of. If you need to do something like that, consider using a `repeat while/until` block instead of `forever`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [February 25, 2022, 6:21am UTC](https://community.thunkable.com/t/internal-error-generating-code-for-blocks-how-to-fix/1636223/6 "2022-02-25T06:21:53Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
