Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Solaras
Wanderer


Joined: 11 Mar 2002
Posts: 93

PostPosted: Tue Jun 27, 2006 3:43 am   

Quick help breaking this alarm into time components, please
 
Code:
%concat( %eval( (%alarm( ALARM1)/1000)/60/60), " Hour(s), ", %mod( %eval( %alarm( ALARM1)/1000)/60), " Minute(s), ", %mod( %eval( %alarm( ALARM1)/1000), 60), " Second(s)")


I want it to display hours minutes seconds properly, but I can only seem to get it to display remaining hours 0 minutes remaining seconds.

So obviously my Minutes Param is wrong, but I can't solve the issue myself. If someone can do it for me I would be extremely happy.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jun 27, 2006 9:05 am   
 
You had some misplaced parenthesis in there, and the math was a little off for the minutes calculation. This should be correct, but I am still on my first cup of coffee.

%concat( %eval( (%alarm( ALARM1)/1000/60/60), " Hour(s), ", %mod( %eval( %alarm( ALARM1)/1000/60),60), " Minute(s), ", %mod( %eval( %alarm( ALARM1)/1000), 60), " Second(s)")
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net