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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
jwbrandon
Newbie


Joined: 25 Sep 2010
Posts: 7

PostPosted: Sat Sep 25, 2010 1:38 pm   

And a pattern matching question:
 
I swear, 10 years ago with zMUD I knew all this, but I can't seem to get this pattern matched:

Code:
Hits:   532/ 532    Exp. TNL: 202244     Inv. Items:   16


The line I'm using, at least one of several is:

Code:
#tr {^Hits:%s&%d{hp}/&%d{maxhp} %sExp. TNL: %s&%d{exptnl} %sInv. Items: %s%d


I'm not using the Inv. Items count for anything, so the %d at the end is just to make sure the whole line gets matched without having to deal with extra characters or whatever. I'm using %s because as the numbers change the amount of spaces will change and finally &%d{var} to dump the stuff straight in to the variables but only match numbers. According to my reading, and rereading, and rereading this should work fine... but no match. Help?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Sep 25, 2010 6:25 pm   
 
remove all the {}. You don't need them when using &varname syntax.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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