PDA

View Full Version : Return Without Gosub...



nat_wheatley
08-29-2010, 05:45 PM
If anyone has a chance could they look at the attached file and see if they can find what I've done wrong. It's a modified Custom9 file, which I've uploaded as a text file. I believe that it's at line #79 that I'm getting the 'Return Without Gosub' error.


At one point, on line #20, I changed the GOTO, to GOSUB, and the file ran through without the error, but I'm getting a misplaced 'RETURN' in spots, when I run this file in a series of files. Not sure what part of the syntax is incorrect. Thanks.

zeykr
08-29-2010, 06:55 PM
Looks to me that any call to table_x or Table_y should be a gosub and not a goto. You are jumping down to perform a subroutine, then will return to the original point of execution. I see these are lines 19, 20 and 28.


If the subroutine has a return statment, it should be called with a gosub.

nat_wheatley
08-29-2010, 07:02 PM
Thanks Ken. I've changed those 3 line to 'GOSUB' and will try running the file tomorrow.

Nat