Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Sep 29, 2006 11:23 pm   

[1.08] Operator CONCAT requires two arguments
 
I've mailed Zugg, but if anyone else gets this error this may help you track down the problem so you can disable the trigger...

The error:
Operator CONCAT requires two arguments

The pattern (not a regular expression) that caused it:
has ({|suddenly })arrived

This problem has been in all versions of CMUD so far. I actually use this technique in quite a few of my triggers to match optional stuff.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Sep 30, 2006 12:07 am   
 
This is me pulling a very obscure one-liner from an early CMud post by Zugg, so I may have this out of context but I believe we're not allowed to do this anymore. One of the ZMud weirdnesses he got rid of or something.
_________________
EDIT: I didn't like my old signature
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sat Sep 30, 2006 12:09 pm   
 
just change it to {arrived|"suddently arrived"} or whatever..
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sat Sep 30, 2006 10:48 pm   
 
using {|whatever} doesn't seem weird, it seems perfectly reasonable to want to use imho
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 02, 2006 6:17 pm   
 
The real question is to see if regular expressions support this. In other words, can you do

has ((|suddenly ))arrived

in a regular expression and have it work? If regular expressions don't support this, then I might not be able to fix it. Although it if worked in zMUD then I should be able to get it to work in CMUD since they share the same regular expression (PCRE) code.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Oct 02, 2006 9:04 pm   
 
using http://regexlib.com/RETester.aspx

pattern 'has (|suddenly )arrived'
matches both 'has arrived' and 'has suddenly arrived'
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Arlie
Wanderer


Joined: 09 Jun 2006
Posts: 62
Location: Florida

PostPosted: Mon Oct 02, 2006 9:12 pm   
 
In regex it'd better be expressed as 'has (suddenly)? arrived', wouldn't it? Granted, that's hard to apply to a concatenation function, but is it possible to do something similar in a regex trigger?
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Oct 03, 2006 9:34 pm   
 
In zMUD,
Code:

has ({|suddenly })arrived

is converted to
Code:

has (suddenly |)arrived

if I click on the convert to Perl regular expression button. It still works (of course) after I do this.

If I use either Zugg's regular expression example above, or the zMUD convertion to regular expression syntax just above, I get a different kind of problem: I no longer get an exception when CMUD has to parse some output through its trigger parser, but if that output matches the regular expression, I get a Converting dialog pop-up, and an apparent inifite-loop, where it tries to convert my settings again and again (using 100% CPU), until finally something times out the process and an Access Violation pops up. I've sent this AV stack trace to Zugg.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Oct 03, 2006 9:40 pm   
 
BTW, also tried
Code:
has (suddenly)?arrived
and it gives the same problem as the regular expression in my last post (infinite loop).
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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