# \[answered\] Code project stuck in text mode

**URL:** <https://forum.code.org/t/answered-code-project-stuck-in-text-mode/40490>\
**Category:** Coding and Debugging Help\
**Tags:** gamelab\
**Created:** [March 4, 2025, 2:37pm UTC](https://forum.code.org/t/answered-code-project-stuck-in-text-mode/40490 "2025-03-04T14:37:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![itypedthismyself](https://avatars.discourse-cdn.com/v4/letter/i/9fc29f/32.png) [@itypedthismyself](https://forum.code.org/u/itypedthismyself)\
**Post date:** [March 4, 2025, 2:37pm UTC](https://forum.code.org/t/answered-code-project-stuck-in-text-mode/40490/1 "2025-03-04T14:37:14Z")

</div>

I am creating a project in Game Lab, and I normally use the engine in text mode. I was curious to see what it would look like in block mode, so I tried to switch. To my surprise, it told me there was an error that had to be corrected before I could do that.

This confused me, because as far as I could tell, there were no indicated errors in the code. Is there a line that I added that maybe can’t be translated over to blocks? I don’t understand why this is happening and would appreciate some help.

Here is the link to the project: [Game Lab - Code.org](https://studio.code.org/projects/gamelab/I9_8UO1NN0AY-2bFO1q7xWnHGAAMsjocLrLGcL65ir4)

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![varrience](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/varrience/32/8042_2.png) [@varrience](https://forum.code.org/u/varrience)\
**Post date:** [March 4, 2025, 7:03pm UTC](https://forum.code.org/t/answered-code-project-stuck-in-text-mode/40490/2 "2025-03-04T19:03:10Z")

</div>

the braces was your issue

```js
var d = 0;
var loopx = 0;
var loopy = 0;
var loopmax = 9;
var checkpos = 4;
var ylghtmsoffset = 70;
var Ylightdist = 100;
var stagenum = 1;
var stagelightdist = 1.2;
var character = createSprite(60, 60, 20, 20);
var targetX = 0;
var targetY = 0;
var switchtarget = 1;

var wallcol = createGroup();
//these are the lists that control the stage placement

/*
  it's a grid, the ones are where there's a block and the 0's are where there isnt
*/
//initial stage setup
//initial stage setup
var r1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1];//row one
var r2 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];//row two, etc.
var r3 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r4 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r5 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r6 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r7 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r8 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r9 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1];
var r10 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1];

```

while it is valid js the block parser does not know what to do with sectioned code like that

# Varrience

---

<div class="post-metadata">

**Author:** ![itypedthismyself](https://avatars.discourse-cdn.com/v4/letter/i/9fc29f/32.png) [@itypedthismyself](https://forum.code.org/u/itypedthismyself)\
**Post date:** [March 5, 2025, 3:45am UTC](https://forum.code.org/t/answered-code-project-stuck-in-text-mode/40490/4 "2025-03-05T03:45:14Z")

</div>

ohhhhhhh thank you, that was helpful!
