Can't get back to block mode

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

Link to the project or level: Game Lab - Code.org

What I expect to happen: Can’t get back to block mode

What actually happens: Student is stuck in block mode

What I’ve tried: Tried debugging and reviewed content for missing brackets or quotes–can’t locate the problem preventing her from going back to block mode

There are a couple of things going on. The first thing I would look at is line 8 where livingRoom is called before it’s been created in line 10. In line 96, there is if(room==“livingRoom”) outside the drawBackgroun(). More simply though, I would encourage the student to work with the AI debugging tool to help clear up the items that are getting in the way of returning to blocks.

Hi,

We tried AI debugging and it isn’t able to tell us what’s wrong and there’s nothing marked red. I also tried to move line 8 after line 10 and that didn’t help. I looked at 96 and moved it back a bit and that didn’t help. Can you clarify what you mean? I’m not sure where to go from here. Thanks!

Hello I may be a little late but the culprit is you have semicolons after various if statements which is bugging it. Example from code: if (foundMouse == true); {
Removing those semicolons after the parenthesis in lines: 143, 159, 177, and 196 should do the trick and let you switch back to block mode.

Thank you SO much! :grinning_face: