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
Sorwen
Beginner


Joined: 16 Nov 2001
Posts: 13

PostPosted: Thu Jan 03, 2002 8:16 am   

Variable help
 
ok using 6.24
I need to capture a person's name when they say something to me I did the below but it will not capture the name. I understand doing numbers but strings don't seem to work the same. The Var is CharacterOrder.

Pattern: %w says 'dauthr give me a torch'.
CharacterOrder = %1


After that I'll add all the things I want him to say/do but the CharacterOrder variable is always empty. Any know what I'm doing wrong

Thanks.
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Thu Jan 03, 2002 9:36 am   
 
If you want something in a pattern captured for further use, you need to enclose it in parentheses ()

So, your trigger command would be:
#tr {(%w) says 'dauthr give me a torch'.} {#var CharacterOrder %1}



Bob, aka Kayd on SWMud and a few others.
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Thu Jan 03, 2002 9:38 am   
 
quote:


Pattern: %w says 'dauthr give me a torch'.
CharacterOrder = %1




Change your pattern like this:

(%w) says 'dauthr give me a torch'.
Reply with quote
Sorwen
Beginner


Joined: 16 Nov 2001
Posts: 13

PostPosted: Thu Jan 03, 2002 5:52 pm   
 
DOH! Oh I feel stupid now. :) "I understand doing numbers" :P self. I guess I let the fact it was a string scare me.

*sheepish*
Thanks :)
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