Line 204 should be followed by "THEN". You also need to insert "ENDIF" between line 194 and 195.