Jump to content




[help] time based lock program


  • You cannot reply to this topic
1 reply to this topic

#1 rex41043

  • Members
  • 88 posts

Posted 11 April 2012 - 08:52 PM

i was working on a program that can tell time but i cant get it to work heres the code
if os.time() < 1700 then
print("night time")
elseif os.time() > 1700 then
print("day time")
end
end


#2 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 11 April 2012 - 08:58 PM

the output from os.time() is in decimals, so 8 am = 8.0 1700 would be 17





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users