First check the action that corresponds to the error id, if everything is ok with it then check the if conditions that are above this action and most likely there is a syntax error there. There is an old bug in bas when the id indicates an incorrect error number