Change all your close statements to end;   You should only use close; when there's a mes statement somewhere to avoid that kind of error. In this case, you aren't using any mes, so don't use close;
    • Upvote
    1