Use the same technique for the TX and TY variables. Ex: IF TX<10 AND TY<10 THEN ?1