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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Gregorius
Beginner


Joined: 12 Nov 2006
Posts: 16

PostPosted: Sun Nov 12, 2006 8:32 pm   

[1.15] Minor bugs.
 
I have a variable @timer which is time calculated in seconds.
Pattern is following:
((%time(d) * 86400) + (%time(h) * 3600) + (%time(n) * 60) + %time(s))

Value of @timer becomes 016 or something similar... Not what is should.

Also cmud jams when i delete things using delete key or shift-del inside "save session as" and similar places. Jams tend to be random to make things more difficult.
Reply with quote
asira
Beginner


Joined: 24 Jun 2002
Posts: 24
Location: United Kingdom

PostPosted: Sun Nov 12, 2006 10:40 pm   
 
The output of %time is a string, which evalatues to 0 for the mathematical calculations. To fix this you need to covert it to a number before the maths, using something along the lines of this:
Code:
((%int(%time(d)) * 86400) + (%int(%time(h)) * 3600) + (%int(%time(n)) * 60) + %int(%time(s)))

Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 13, 2006 8:24 pm   
 
I'll try to make the output of %time auto-typed so that this won't happen.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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