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

Compter Reset

Started by flukeyfob, 30 June 2015 - 08:49 PM
flukeyfob #1
Posted 30 June 2015 - 10:49 PM
Ok so I'm on a server that can easily have the chunks unloaded and i want a command that forces the computer to reboot itself every 5 minutes or so so it keeps the monitor message up all the time. Is there a way to do this? (The modpack has timers in it if that comes in handy)
Lyqyd #2
Posted 01 July 2015 - 01:09 AM
Moved to Ask a Pro.

Assuming you're just trying to ensure that computers are booted when the chunk they're in is loaded again (they should do this on their own, it's a longstanding bug that they don't), you might try placing an autonomous activator to "click" on the computer. You can even have the computer deactivate the activator with a redstone signal when it turns on if you like.
Lupus590 #3
Posted 01 July 2015 - 12:28 PM
this may be useful

Does Dan200 have any idea what may be causing this bug? and how to fix it?
Edited on 01 July 2015 - 10:30 AM
negamartin #4
Posted 01 July 2015 - 09:52 PM
Ok so I saw my post get deleted. I guess it's my fault however as I posted code to just copy paste.
So I'll try to give a better answer.

I dont think he's looking for something that turns the computers on (do you?) but instead for something that forces a 'spontanous' reboot to test his program.

The solution depends on your code, specifically if it uses read(), rednet.receive() or any function that 'stops' your program.
Probably there is at least one in your code, so you'd like to take a look at the parallel API. http://computercraft...i/Parallel_(API)
Specifically waitForAny. See where I'm going?


Ok Lyqyd made me realize I'm probably wrong so just ignore this. However, it still would be useful if you clarify what you're looking for.
Edited on 04 July 2015 - 05:52 PM
Lyqyd #5
Posted 02 July 2015 - 01:11 AM
Your post was deleted because that does not at all appear to be what he's asking for. He mentions chunks unloading and reloading, and that the computer is therefore not displaying things that it should be, which strongly implies that the problem is the computer not turning back on when it's reloaded. The solution is therefore to ensure the computer is turned on when the chunk is loaded, and no code inside the computer can accomplish that.