Here's what you have now (I removed some of the code for clarity)
Code:Mainloop: if CYCLE = 0 then goto Mainloop ' just loop if cycle = 1 then gosub recording ' call the subroutine and then return to the next statement ' after executing the above for cycle= 1 you'll return here ' the next statement is the beginning of the "recording" subroutine ' it'll execute that, hit the 'return' and cause a problem since there was no matching call Recording: ' do stuff return ' you'll never get here goto mainloop
Without changing any of the code to test 'cycle', here's what it should look like
Code:Mainloop: if CYCLE = 0 then goto Mainloop ' just loop if cycle = 1 then gosub recording ' call the subroutine and then return to the next statement goto mainloop ' infinite loop back to main Recording: ' do stuff return




Bookmarks