Line 33 just means it hit the end of the program without finding a NEXT. The line number is useless. You have to find the problem yourself. Looks like you are also missing an END for that DEF.