Just for the heck of it, try compiling it in 4.20 (without the option that saves in 4.18 format). It seems to me (could be wrong) but 9998 MIGHT be the error I was getting when one of my form statements got too big to compile. When I went to 4.20, the problem disappeared because compiled line lengths can be pretty much unlimited in 4.20.
That's just a guess though. I didn't keep a record of the error when it happened.
I have also gotten strange error codes on occasion when I have mismatched If/THEN/ELSE or for/next statements.