for hours = 0,99 do
for minutes = 0,59 do
for seconds = 0,59 do
term.setCursorPos(1,1)
term.write((hours < 10 and "0"..hours or hours)..":"..(minutes < 10 and "0"..minutes or minutes)..":"..(seconds < 10 and "0"..seconds or seconds))
sleep(1)
end
end
end
To be honest, I didn't think I would work on this as much as I had. But I had fun with it. Since minutes and seconds can only be at maximum 59 before the counter resets to 0, the only 99 you'd have is the hours
, which you can simply just swap out the 24 in the code for a 99. changed
Although, to be more honest, I didn't test this code, and the ternary operators might be off, but it should work. I just don't have an emulator available right now.
Also, I'm moving this to the General section, since it's more of a request.
Edited by Cranium, 21 August 2014 - 07:59 PM.