Because there's an error in line 24 of your script. You did not post the complete script. KiXtart has a build-in LOGOFF function, use it! In case of a simple YEs/NO you only need to test for one condition, thus an IF-ELSE-ENDIF is sufficient. Why do you log them off in either case, anyway?
_________________________
There are two types of vessels, submarines and targets.