Posted 25 May 2017 - 11:34 PM
Wrote a clock program for my terminal glasses and it was working fine. server Im on restarts and when i log back on suddenly its broken
error message:
clock:15 attempt to index ? (a nil value)
CODE:
error message:
clock:15 attempt to index ? (a nil value)
CODE:
glass = peripheral.wrap("left")
function addBox()
glass.addBox(1,20,80,10,0xFFFFFF,0.2)
end
function drawTime()
time = textutils.formatTime(os.time(), false)
glass.addText(5,21,"TIME: " .. time, 0xFF0000)
end
function start()
while true do
glass.clear()
addBox()
drawTime()
glass.sync()
sleep(0,1)
end
end
start()