However if your writing a script that requires it, I'de be happy to add it.
Would something that gave you the present hour in 24 hour format do? Or would you prefer some constant strings ("dawn", "morning", "noon", "afternoon", "evening", "night")?
-Kevlar
PS. Great question BTW. Keep em comming.
time_hour "current_hour"
if greaterthan %current_hour 20 or lessthan %current_hour 5
// Do night here
elseif greaterthan %current_hour 4 or lessthan %current_hour 11
//Do morning here
elseif greaterthan %current_hour 10 or lessthan %current_hour 16
//Do afternoon here
else
//Do evening here, because there's nothing else it could be.
endif
You can also use time_minute, and time_second for minute and second values.
Will this do?
-Kevlar
----
time_hour "current_hour"
if greaterthan %current_hour 20 or lessthan %current_hour 5
// Do night here
elseif greaterthan %current_hour 4 or lessthan %current_hour 11
//Do morning here
elseif greaterthan %current_hour 10 or lessthan %current_hour 16
//Do afternoon here
else
//Do evening here, because there's nothing else it could be.
endif
----
Error while running 'a', on line 2:
Error while calling 'if' with '21, 20, 21 and 5'
Error while calling 'greaterthan' with '21 and 20': Type mismatch
----
Am I missing something?
----
It's fixed now.
-Kevlar
P.S. In case your curious: The problem was that I had split apart a string in order to get the number, and had forgot to convert it back to an integer. When it went to do the 'greaterthan' or 'lessthan', it knew it couldn't compare a string to an integer, so it blew up.