1 posts
Posted 17 May 2015 - 03:06 PM
if userinput == "1" then
redstone.setBundledOutput(side, 16)
print("Lights are turned on.")
os.reboot()
end
Does anybody know why it jumps directly to os.reboot() and skips the rest? It worked yesterday but today this part is giving me headache..
8543 posts
Posted 17 May 2015 - 05:44 PM
Moved to Ask a Pro.
Please post the whole script.
1080 posts
Location
In the Matrix
Posted 17 May 2015 - 06:25 PM
It doesn't jump directly to os.reboot(). It does what you ask, however it happens so quick you see nothing else. Also, the reason why the redstone signal is not showing, is because when a computer is turned off, it does not emit a redstone signal. So it quickly tries to send out a signal, then sends out no signal after the reboot. If I'm wrong then you might be setting the bundled output at the top of your script.
756 posts
Posted 17 May 2015 - 09:22 PM
I would suggest adding a small sleep() before calling os.reboot().
524 posts
Location
Cambridge, England
Posted 20 May 2015 - 08:46 PM
All redstone outputs are turned off when the computer shuts down/reboots
8543 posts
Posted 21 May 2015 - 01:08 AM
Looks like this thread may have been accidentally locked (as it is in Ask a Pro, and no longer in Bugs), so I'm re-opening it in case OP has further questions about redstone outputs and computer power states.