Search the Community
Showing results for tags 'loop'.
For some reason break isn't exiting this while loop, when I input "exit" it just prints it and continues the loop instead leaving it. While true do Local input = term.read () Term.write (input) If input == "exit" then Break End End
TL;DR: http://pastebin.com/DG1wiRDc I was messing around with tape drives and trying to make them loop, and it turns out that it's a bit more complicated than it would seem. If the audio used is shorter than the tape, the tape doesn't automatically stop when the audio ends, instead playing silence for the rest of the unused tape length, before stopping. This renders isEnd() and .getState() useless, because after the audio is over, the tape will still play, only actually ending (and stopping) several minutes later (audio and tape length assumed to differ by several minutes, your mileage m