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
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Sat Jun 21, 2008 12:19 am   

[2.28] Bug with using wildcards in {} in trigger patterns.
 
Steps:

Code:

<trigger priority="43050" id="4305">
  <pattern>^{(%w) lends a hand to aid you.}$</pattern>
</trigger>


Test that with the output of:

Someone lends a hand to aid you.

Pattern doesn't math.


Code:

<trigger priority="43050" id="4305">
  <pattern>^{test (%w) lends a hand to aid you.}$</pattern>
</trigger>


Test that with the output of:

test Someone lends a hand to aid you.

Pattern matches, storing Someone to %1 like it should.

This isnt exactly the context Im using it in as obviously it would be stupid to use {} in the above pattern, but it allows you to see the bug without being too complex.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Jun 21, 2008 12:42 am   
 
This was confirmed, wasn't it? The bug is with items that start with a bracket inside {}.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Sat Jun 21, 2008 5:20 pm   
 
That was a bug with dbkeys starting with (. It was fixed, this is a different issue I believe but was probably caused by that bug fix.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Sun Jun 22, 2008 2:52 pm   
 
More testing with this bug... Using the patterns posted origionally (the first one)

This will match any one word line.

#TRIGGER {^{(%w) Test Pattern}$} {#SAY Broken Script}

with the above pattern go into test pattern and type in any single word, pattern matches.

This trigger will also fire in the mud on any one word line.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jun 22, 2008 3:39 pm   
 
This is interesting. The resultant regex from your pattern is "^(?:\a+| test pattern)$". The \a is a CMud extension and quite right, but the pipe is obviously wrong. Also the compiled pattern tab shows an unmatched braces error which is clearly wrong.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 23, 2008 4:55 pm   
 
Weird. But confirmed and added to bug list.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 25, 2008 5:55 pm   
 
Fixed for v2.29
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