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
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Wed Jun 26, 2002 3:06 am   

Alarm
 
I have an alarm that ticks every second to emulate basically the same function as %ctime.

#ALARM "ConnectTimer" -*:*:* {connect = %eval( (%time( d)*60*60*24)+(%time( h)*60*60)+(%time( n)*60)+%time( s))}

Yet it isn't working. Any idea why?

Fat Tony
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jun 27, 2002 12:23 am   
 
quote:

I have an alarm that ticks every second to emulate basically the same function as %ctime.

#ALARM "ConnectTimer" -*:*:* {connect = %eval( (%time( d)*60*60*24)+(%time( h)*60*60)+(%time( n)*60)+%time( s))}

Yet it isn't working. Any idea why?

Fat Tony



Illegal syntax. Instead of *:*:*, you'll want to use the modulus syntax (*1, for example, would fire every second).

If you're getting erroneous values, I suppose it's that monster you're trying to assign to @Connect. What's the purpose of all that multiplication?

li'l shmoe of Dragon's Gate MUD
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 27, 2002 12:31 am   
 
The real question might be, "Why do you think you need to do this?" You can get the same value, whenever desired, from the %eval you are already using. It's hard to see much value in computing it every second. This isn't connect time anyway, it's just the number of elapsed seconds in the month.

LightBulb
Senior Member
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