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


Joined: 20 Apr 2004
Posts: 9

PostPosted: Mon Jan 22, 2007 4:32 pm   

Using ( in a trigger
 
Hello,

i have the next line in my mud:

Pv: 457(457) Pe: 270(345) Pm: 32(32) Px: 5035629 Psoc: 108

I want to capture hpnow and maxhp. In zmud i do anything so

Pv: (%d){(}(%d){) Pe: }(%d){(}(%d){) Pm: }(%d)

#var hpnow %1
#var maxhp %2

But in cmud it doesnt work. I think that it is for the (, i try to put in the script "#echo Any", but it doesnt go. Any idea?


Sorry for my english.

Balrugh.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jan 22, 2007 4:59 pm   
 
Braces {} aren't the proper way to comment something, that creates a stringlist such as {tea|biscuits|cakes} that will all match. The proper way to comment is this:

Pv: (%d)~((%d)~) Pe: (%d)~((%d)~) Pm: (%d)

Just add a ~ before the special character you want to match. If the pattern was this:

(Blah)

you'd use this:

~(Blah~)

because brackets () are special characters.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Jan 22, 2007 5:01 pm   
 
I'm surprised it works in zMUD, as the syntax isn't quite correct. Use ~ to escape special characters

This should work in both
Pv: (%d)~((%d)~) Pe: (%d)~((%d)~) Pm: (%d)~((%d)~) Px: (%d) Psoc: (%d)


Edit: Bah, you beat me to it Fang
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
balrugh
Newbie


Joined: 20 Apr 2004
Posts: 9

PostPosted: Tue Jan 23, 2007 2:42 pm   
 
Very Thanks :) I probe it and it function.
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