 |
sda Wanderer
Joined: 18 Apr 2001 Posts: 55 Location: United Kingdom
|
Posted: Sat Nov 09, 2002 10:42 pm
Zmud trigger matching problem 6.16 |
Hello
I've reposted this message with the correct title, please could a moderator remove the offending one titled: "nested #IF problem" please?
I'm using v6.16 and the pattern matching doesn't seem to be working properly. It works perfect on all BETA versions from 6.26 upwards (however, I can't use BETA version as they have problems of their own which I have just posted to their forum).
The line below show some combinations of text I may receive from the mud:
Player tells you: heal
> Player tells you: status
[E]:Player tells you: temp 3
> [E]:Player tells you: help
Here is my trigger pattern, a breakdown of which is below:
^{> |}{[E]:|}(%w) {tells you|replies|whispers to you|says|asks|asks you|snarls|sings|joiks|teases you for}{:|} ([abcdefghijklmnopqrstuvwxyz0123456789 ])
This works fine on 6.26 upwards.
^{> |}{[E]:|}(%w)
is to cover all variants of these characters (as listed above). There is a space after the (%w)
{tells you|replies|whispers to you|says|asks|asks you|snarls|sings|joiks|teases you for}
is all possible options I want to match, preceeded by what will be the player's name which I want to capture
{:|}
there may or may not be a colon character depending on the option (there is a space after this part of the pattern).
([abcdefghijklmnopqrstuvwxyz0123456789 ])
some funny chars like ! cause an "error parsing..." error in Zmud, so I only want to match and capture any of the following characters including a space.
The problem lies with this bit at the beginning: ^{> |}{[E]:|}(%w)
Zmud 6.16 refuses to work, the rest of the trigger seems to be fine and works if I omit everything except (%w). As I said, this works properly in 6.26 and above.
Any ideas?
Thanks,
Steve ;) |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Nov 09, 2002 10:56 pm |
Yes, that's a bug in 6.16: it doesn't allow null strings in stringlists used in patterns. Try making the trigger more general by omiting the first characters and start matching at "Player tells you...".
Alternately, you can create two triggers. One of these triggers will match the case when "Player tells you..." comes at the beginning of the line:
^(%w) {tells you|replies|whispers to you|says|asks|asks you|snarls|sings|joiks|teases you for}[: ]([abcdefghijklmnopqrstuvwxyz0123456789 ])
and the other matches the three other cases:
^{> |[E]:|> [E]:}(%w) {tells you|replies|whispers to you|says|asks|asks you|snarls|sings|joiks|teases you for}[: ]([abcdefghijklmnopqrstuvwxyz0123456789 ])
Kjata |
|
|
 |
sda Wanderer
Joined: 18 Apr 2001 Posts: 55 Location: United Kingdom
|
Posted: Sun Nov 10, 2002 12:04 am |
Thanks for your speedy response Kjata.
Yes, I can make seperate triggers, but can you tell me how much having 4 triggers like this instead of one, will impact the performance of Zmud?
Thanks again,
Steve ;) |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Nov 10, 2002 2:28 am |
quote:
Thanks for your speedy response Kjata.
Yes, I can make seperate triggers, but can you tell me how much having 4 triggers like this instead of one, will impact the performance of Zmud?
Thanks again,
Steve ;)
I doubt you'll see any differences in impact, unless your all-in-one trigger was really slow-running and code-intensive. The official standing is that the more specific a trigger is (ie, more text, less wildcards) the faster it will be compared to triggers with more wildcards and less text. However, you're going to need a pretty big settings file and a very broad trigger to start seeing any noticeable problems.
li'l shmoe of Dragon's Gate MUD |
|
|
 |
sda Wanderer
Joined: 18 Apr 2001 Posts: 55 Location: United Kingdom
|
Posted: Sun Nov 10, 2002 2:46 am |
Thankyou both for your replies.
Steve :) |
|
|
 |
|
|
|
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
|
|