Posted 21 July 2012 - 05:53 PM
I am trying to make a real world clock for my server.
Here is the code that I have written, for some reason when I run the program it will work and print the first print but then will freeze and I have to terminate it.
The idea is for it to loop indefinably.
Thank you for taking the time to read this.
Here is the code that I have written, for some reason when I run the program it will work and print the first print but then will freeze and I have to terminate it.
The idea is for it to loop indefinably.
hours = 17
minutes = 36
print (hours, ":", minutes)
while hours <= 25 do
while minutes < 60 do
minutes = minutes + 1
sleep (60)
end
if minutes = (60) then
hours = hours + 1
minutes = 0
end
if hours = (24) then
hours = 00
end
shell.run("clear")
print (hours, ":", minutes)
end
Thank you for taking the time to read this.