mon=peripheral.wrap("right")
mon.setCursorPos(8,2)
mon.write("Reactor Status")
mon.setCursorPos(1,4)
mon.write("--------------------------------------------")
mon.setCursorPos(2,6)
Reactor = rs.testBundledInput("back",colors.red)
if Reactor == false then
mon.write("Reactor Status : OFF")
end
if Reactor == true then
mon.write("Reactor Status : ON")
end
Power = rs.getInput("top")
if Power == false then
mon.clear()
mon.setCursorPos(8,6)
mon.write("Shutting Down")
sleep(2)
os.reboot()
end
I am getting the error:
shell:17: vm error: bios:38: vm error:
java.lang.ArrayIndexOutOfBoundsExeption
In case you Can't tell I have the red wire (from bundled cable) connected to a reactor so it show's the status of it on a monitor
And the part marked Power is so when my control computer gets shutdown, this computer reboots.
Oh and one more thing - I have been trying to find ways to get this program always stay active, for eg. automatically reload itself when the reactor status changes (because i have to manually reset the computer to see on the screen, also Be able to turn of the computer without having to shutdown the main one and then reset this computer :/
Any help appreciated!