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
insanity_2000
Newbie


Joined: 13 May 2002
Posts: 0
Location: USA

PostPosted: Fri Apr 12, 2002 8:34 pm   

Numbers
 
Is there a way to make 1,234,567 look like
1234567 ... perhaps using a syntax with #say.

To be specific, I want to make a trigger with gold, but the mud returns gold with commas. Using (%d) won't return anything when the number has commas. Is there a way around this?
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Apr 12, 2002 9:15 pm   
 
Use %x in patterns, it'll match anything except spaces.

You can process it using the %replace function.

#TR {(%x) gold} {#VAR gold %replace("%1", ",", "")}

Troubadour
Reply with quote
HariKari
Wanderer


Joined: 16 Feb 2001
Posts: 57

PostPosted: Sat Apr 13, 2002 2:04 am   
 
Actually.. %n catches the ,'s and removes them for you.

#TRIGGER {(%n) gold} {#var gold {%1}}
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