We are trying to make a CCSensor that will give information to a monitor about a EU Storage Unit (Batbox)
It gives a error at the
write("Energy : "..Energy.."/"..Max.." ")
line
term.clear()
term.setCursorPos(1,1)
sensor = sensors.getReadingAsTable("right", "EUSensor","maxStorage" ,"energy" ,"tier")
Max = sensor[1]
Energy = sensor[2]
Tier = sensor[3]
if Tier == 1 then
unit = "BatBox"
elseif Tier == 2 then
unit = "MFE"
elseif Tier == 3 then
unit = "MFSU"
end
while true do
sleep(0)
term.clear()
term.setCursorPos(1,1)
write("================UTILITIES=================")
term.setCursorPos(1,2)
write("Time : "..textutils.formatTime(os.time(),true))
term.setCursorPos(1,4)
write("===============STORAGE UNIT===============")
term.setCursorPos(1,5)
write("Energy : "..Energy.."/"..Max.." ")
term.setCursorPos(1,6)
write("Tier : "..unit.." ")
end
I just cant get it to work :P/>/>