TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Weird matching error

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Fri Jul 22, 2011 10:57 pm    Post subject: Weird matching error Reply with quote

I've been using 2.00.3 on OSX for something like a year now. Today, I switched to 2.00.7. After noticing some weirdness, I switched back to 2.00.3.

So one of the weird things I noticed after switching to .7 is that the following macro stopped working:

Code:
#act {seems to be most susceptible to %1 attacks.} {evoke resolve as %1}


After I switched back to .3, the macro was still not working (which is really really odd.) So I altered the macro to read:

Code:
#act {%0 seems to be most susceptible to %1 attacks.} {evoke resolve as %1}


And now it works.

What's up with that?

Thanks,
Pasta
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Fri Jul 22, 2011 11:14 pm    Post subject: Reply with quote

Most likely a priority error, meaning another trigger is firing on that line.

Another work around would be:
Code:

#act {seems to be most susceptible to %1 attacks.} {evoke resolve as %1} {4}
Back to top
View user's profile Send private message Send e-mail
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Fri Jul 22, 2011 11:22 pm    Post subject: Reply with quote

Unfortunately, it's not a priority error.

Code:
[pasta@farian tt]$ which findgrep
findgrep:     aliased to find . -type f -print | grep -v -e # -e CVS -e svn -e build\/ -e deploy -e jar -e "\.war" -e class -e pdf -e gif -e exe -e jpg -e png | xargs grep -l
[pasta@farian tt]$ findgrep suscept
./elem.tt
[pasta@farian tt]$ grep suscept elem.tt
#act {%0 seems to be most susceptible to %1 attacks.} {evoke resolve as %1}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sat Jul 23, 2011 12:53 am    Post subject: Reply with quote

You'd have to check with: #debug action on to see if something else is triggering.
Back to top
View user's profile Send private message Send e-mail
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Sat Jul 23, 2011 1:22 pm    Post subject: Reply with quote

Yep, that helped solve the issue. I had something else triggering on a different word on that line. Will have to figure out a different way to do what I wanted. Smile

Thanks Scandum, I'd forgotten about that #debug thing.

-Pasta
Back to top
View user's profile Send private message
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Sat Jul 23, 2011 1:35 pm    Post subject: Reply with quote

So the follow-up: How do I check if a string contains a space or not?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sat Jul 23, 2011 7:05 pm    Post subject: Reply with quote

#regex {<string>} {%* %*} {true} {false}
Back to top
View user's profile Send private message Send e-mail
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Sun Jul 24, 2011 12:20 am    Post subject: Reply with quote

Hmmm, thanks. I'll look into that.

BTW, it looks like #regex isn't in the manual on the website.

-Pasta
Back to top
View user's profile Send private message
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Sun Jul 24, 2011 12:27 am    Post subject: Reply with quote

Code:
#act {^%1 attacks %2} {#regexp {%1} {%w %w}} {say ignoring...} {say match!}


With "#debug action on", I get the following:

Code:
#showme Asdf asdf attacks blar.
#DEBUG ACTION {^%1 attacks %2}
[15] regexp {Asdf asdf} {%w %w}
[18]
Asdf asdf attacks blar.

#showme Asdf attacks blar.
#DEBUG ACTION {^%1 attacks %2}
[15] regexp {Asdf} {%w %w}
Asdf attacks blar.


Am I missing something further?

Thanks,
-Pasta
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun Jul 24, 2011 12:52 am    Post subject: Reply with quote

Code:

#act {^%1 attacks %2} {#regexp {%1} {%w %w}} {say ignoring...} {say match!}

You got a brace in the wrong place:
Code:

#act {^%1 attacks %2} {#regexp {%1} {%w %w} {say ignoring...} {say match!}}
Back to top
View user's profile Send private message Send e-mail
Pasta



Joined: 15 Feb 2010
Posts: 32

PostPosted: Sun Jul 24, 2011 11:16 am    Post subject: Reply with quote

Perfect! Thanks!

-Pasta
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group