Anytime you use an IF statement with multiple commands ---on one line---, separate the commands with colons. Ex. IF(A==B) THEN CMD1:CMD2:CMD3 If they look like the example I gave above, with ---multiple lines--- then make sure there's an ENDIF at the tail end. If(A==B)THEN CMD1 CMD2 CMD3 ENDIF