Thanks for the code, it works well.
edit: I am not sure. But I think the code for the crew has a problem.
Sometimes we can have a captain in each ship, but this one does not execute orders. I change ships or reverse the captains, and the problem remains.