120 posts
Posted 23 January 2013 - 07:58 AM
is their an easy way to make it not do this?
like someglobal variable i can change to skip that error check?
2005 posts
Posted 23 January 2013 - 08:06 AM
No, and even if there were you shouldn't. Yielding is vital because all the computers are being emulated in the same program…so the execution needs to advance one program at a time and then switch to another program to advance that. Yielding is the current means of accomplishing this.
The mod development team is working on making it so that the program on a computer doesn't have to yield, and will simply be interrupted in mid-execution to let other computers run their programs. But even when this feature is implemented, it will still be best practice to write your programs so that they yield, so as to run efficiently.
120 posts
Posted 23 January 2013 - 08:08 AM
so given that my program is a gaint turtle 3d printer , how do i make it yeild ? os.sleep() after so many moves or somthing?
48 posts
Location
Colorado, USA
Posted 23 January 2013 - 08:11 AM
Don't need os.sleep(), just sleep() will work for ya…..so like add in sleep(1) in every now and then.
2005 posts
Posted 23 January 2013 - 08:30 AM
That's one way of doing it. Also, nearly all the normal turtle functions use os.pullEvent("turtle_response") If you've managed to bypass that somehow, then you should stop.