Posted 23 June 2017 - 09:37 AM
Hey guys. I have been following a Youtube video on how to make a Program to read BigReactors and display the data. He got 3 errors (two was forgetting to close a bracket) and the last one was due to color. what he had was
but this isnt working for me
display.setBackgroundColor(color.blue)
he said to fix it was to change the color.blue to colors.bluebut this isnt working for me
reactor = peropheral.wrap("back")
display = peripheral.wrap("right")
display.setBackgroundColor(colors.red)
while true do
display.clear()
power = reactor.getEnergyStored()
fuel = reactor.getFuelAmount()
max = reactor.getFuelAmountMax()
display.setCursorPos(1,1)
display.write("Power: ")
display.setCursorPos(8,1)
display.write(power)
display.setCursorPos(1,4)
display.write("Fuel % ")
display.setCursorPos(8,4)
display.write(math.floor((fuel/max)*100))
if power >= 9000000 then
reactor.setActive(false)
end
if power <= 2500000 then
reactor.setActive(true)
end
sleep(10)
end
Edited on 24 June 2017 - 05:11 AM