Sorry, I was missing indentations, makes it harder to read the code.

The script shoudl runt he same whether it's in debug mode or not as the same lines of code get executed. So, what you're saying is that if you run the exact same ocd but have DEBUG ON in the first line then it does work? Does it work without your customizations?
_________________________
There are two types of vessels, submarines and targets.