Debugger Error:Invalid scope kind

BlitzMax Forums/BlitzMax Beginners Area/Debugger Error:Invalid scope kind

I haven't found anythink with search so...
Debugger Error:Invalid scope kind
I get this message when I step in a function using the DebugStop then I get Process complete and the programm stops.

I really need to know what's going on in those functions to find out where the program makes the error and I get wrong values.

Other times I get just Process complete without a reason.

A simple example pass the test. And I cannot type down the code(it's too big).