Buggy game freezes

This game has a menu for choosing level difficulty etc.
After making the selection the game freezes and I do not understand the cause of the error.
Could anyone please help?
Link: https://makecode.com/_PycTtd3UdeqE

maybe bc when you click any button it has not apear yet bc of the control menu maybe the simulator is confused bc there is a variable that will hapen

1 Like

For these sorts of issues, the debug mode is usually good to see where the error is occurring and why:


and you play the game in debug mode and it crashes, it will stop on the error and highlight the block that ‘broke’ when possible:

It looks like when you call play level for the first time when PlayLevel == 0, back_menu hasn’t been created yet – I saw it being made in the later levels but just not there it looks like:)

1 Like

Thank you for your help.
The game is more functional now.
He is the updated version. Would appreciate any feedback.

1 Like