Posted 03 April 2014 - 07:52 PM
Hey, everyone I just need some help with my reactor status programs always crashing. Insted of loops which I can never get working I am restarting the program with shell.run("reactor"). Every 4 minutes or so I get a syntex error 204 and need to restart the program. Heres the code. Any help even by adding loops or anything wold be great. Thanks. PS Sorry that I cant but the code in the spoiler boxes cant figure out how.
local mon = peripheral.wrap("back") -- Monitor at back
local input = redstone.getInput("front") --Redstone input is at front
mon.clear()
mon.setTextScale(2)
mon.setCursorPos(1,1)
mon.write("reactor 2")
mon.setCursorPos(1,2)
mon.setTextScale(3)
if input == true then
sleep(0)
mon.setTextColor(colors.red)
mon.write("REACTOR MELTDOWN")
sleep(2)
shell.run("reactor")
elseif input == false then
sleep(0)
mon.setTextColor(colors.green)
mon.write("REACTOR NOMIAL")
sleep(2)
shell.run("reactor")
end
Edited by