Posted 04 October 2013 - 10:52 PM
hello. im having difficulty getting this loop to work. any help would be great.
print "reactor is now running"
local status, correct = "n"
while status~=correct do
hot = redstone.getBundledInput ("bottom", colors.blue)
realhot = redstone.getBundledInput ("bottom", colors.orange)
if hot == true then
print "the reactor is getting hot"
elseif realhot == true then
redstone.setBundledOutput ("bottom", false)
print "reactor is too hot!"
print "system has shut the reactor down to prevent damage"
print "would you like to restart the system?"
write "(Y/N): "
end
status = read()
if status == "y" then
shell.run "running"
else
print "shutting down"
sleep(1)
os.shutdown()
end
end