[answered] Code project stuck in text mode

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

Thank you in advance!

the braces was your issue

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

ohhhhhhh thank you, that was helpful!