This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
EvaKnievel's profile picture

Turtle program stops unexpectedly, check console and there is no error

Started by EvaKnievel, 11 October 2014 - 08:16 PM
EvaKnievel #1
Posted 11 October 2014 - 10:16 PM
So I'm running minecraft forge version 1.7.10 in offline mode with version 1.65 of ComputerCraft

I took the excavate script and altered it to suit my needs. http://pastebin.com/QLy8hB1s
I run the script and it works fine, removing 8 x 8 blocks, until at one point in the middle of heading horizontally across the 8*8 (so it's repeatedly calling tryForward) it just stops.
I right click on the turtle and at the top it says

CraftOS 1.6
> _

Just like it does when you hold down ctrl + R
So there is *something* wrong, can anyone point me toward what might be causing this issue?

Thanks :)/>
Lyqyd #2
Posted 11 October 2014 - 10:36 PM
Did you walk a ways away from it? If the turtle's chunk is unloaded, it will reboot when the chunk reloads.
EvaKnievel #3
Posted 13 October 2014 - 02:22 PM
Did you walk a ways away from it? If the turtle's chunk is unloaded, it will reboot when the chunk reloads.

That was probably it, annoying, will have to figure out how to stop that from happening.
Cycomantis #4
Posted 14 October 2014 - 12:15 AM
Theres a couple way around this. First is if they are available to you use a chunk loader so the area the turtle is working in does not unload when you leave.

Secondly you could add some sort of persistence into your code. For example if you have a goto function in your code, when that is triggers save a variable to file saying that the turtle is traveling, and his destination. If the script is interupted the code would first check that variable, see that he was going to the specified location and then continue from there. This will require a lot of logic and code to be added to your current code but if done correctly is very reliable and will even persist through things such as server restarts.