Well, this is looking like a basic program, NOT picbasic

There are many invalid picbasic commands/statements in your program. I think you should read the picbasic manual first before trying to do any programming.

DIM, PRINT, DELAYMS, SHOUT, EWRITE, CLS are NOT valid commands
IF/THEN are not used properly (missing ENDIF)
Variable are not declared the correct way

And there is probably many more errors...

J-P