The easiest way to debug your script is to put DEBUG ON into the first line of your script and step through it.
_________________________
There are two types of vessels, submarines and targets.