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
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sat Jan 26, 2008 2:24 am   

#IF and Text matching
 
so all i'm trying to do is match a word and do stuff with a #IF statement

here's what i thought would work but doesn't


Trigger:

Code:
You spend (%d) gold to infuse (*) with ~- (*) ~-


Value:

Code:
#IF (%3 = "Alchemist's") {make} {infuse}


prolly something really quick and easy for you Guru's :)

thanks for your time.
_________________
Spin
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 26, 2008 2:55 am   
 
I don't see a problem, so I'll have to assume your trigger simply isn't matching the line. One thing to check is that maybe %3 contains something that might interfere with the comparison. To fix that, surround it with double-quotes. Although it's not necessarily intuitive, the %1...%99 variables are filled in before the parser checks any code and thus the proper values get inserted into their proper places instead of using a literal %whatever.
_________________
EDIT: I didn't like my old signature
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Sat Jan 26, 2008 3:08 am   
 
Aaaah Sweet that fixed it...when i put the double quotes around it the first time it dimmed out the %3 so i assumed that wouldn't work...shoulda at least tried I guess hehe

Thanks Matt
_________________
Spin
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Jan 26, 2008 8:07 am   
 
Yeah, it's counter-intuitive and fixed in CMUD, but in zMUD, you have to do it pretty frequently.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jan 26, 2008 10:56 am   
 
Very weird. I've never had to do this in 9 years of using zMUD. LOL. Oh well, if it ever happens I now know at least. Cool.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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