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
Lina
Novice


Joined: 12 Oct 2006
Posts: 49

PostPosted: Thu Sep 06, 2007 11:52 pm   

[2.02] %time removes spaces from own made timestamps.
 
I attempted to make a similar timestamp to the one I used in zmud.

I used:
#say %time(h:n:s z)

I expected to get:
0:44:41 251

instead I got:
0:44:41251

I'm uncertain if it is meant to be this way. If it is, is there any way I can place the space in. Thanks.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Sep 07, 2007 12:10 am   
 
The %time function takes a *string* argument to specify the time format. You need to put "" quotes around your string value, like this:

#say %time("h:n:s z")

otherwise CMUD eats the spaces.

This is just like calling functions with strings in other programming languages, so it's good to get used to using quotes around literal strings.
Reply with quote
Lina
Novice


Joined: 12 Oct 2006
Posts: 49

PostPosted: Fri Sep 07, 2007 2:05 am   
 
thank you
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