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

How does CC handle Minecraft game exit?

Started by Tinkerer, 25 February 2015 - 01:43 AM
Tinkerer #1
Posted 25 February 2015 - 02:43 AM
I'm concerned that having a startup script that runs constantly might encounter problems when I exit my Minecraft world. I'm worried that it might interrupt the script and cause problems like variables or other data not being properly saved.

Is there any way for my CC script to detect shutdown, like an exit trap?
Lyqyd #2
Posted 25 February 2015 - 04:00 PM
Nope. And computers will be freshly rebooted when loading the chunk they are in again.
Tinkerer #3
Posted 25 February 2015 - 04:10 PM
So when leaving a chunk or exiting Minecraft it's possible for my script to be interrupted at any point of its execution?
Cranium #4
Posted 25 February 2015 - 04:26 PM
That's correct. If a computer is not actively loaded either by chunk loaders or spawn loading, it will shut down as if you had held Ctrl+S.