PDA

View Full Version : Match question



Zetar
08-28-2003, 01:17 PM
So I am working on yet another fletching script and am trying to count the ranks. Does anyone know how you cam match a string in a multiline message. I can't match the string "Perhaps you are growing more skillful?" it appears anyone have any ideas?

ogurty
08-28-2003, 06:10 PM
Can you post more information? From what you posted, you shouldn't have any problem. You can match anything, including multi-line messaging.

Hunter

Zetar
08-28-2003, 11:06 PM
Here is the section of my script:

nock2:
put cut nock in shaft with knife
match Counter2 That was a little easier
match drop You decide
match Fail ...might as well toss it
matchwait

I am trying to capture the line "That was a little easier. Perhaps you are becoming more skillful?"
It is the 2nd or 3rd line in a multi-line message and it should call another function called Counter2 which does a Counter Add 1.

I have trued similar things previously in other scripts I made but was never able to get it to work. The Counter2 "function" also does an echo so I know if it is working, and it is not. Attached is the full script, it is unoptimized and I'm sure not the most efficient way to do this but I'm still learning, so be gentle ;-)

ogurty
08-29-2003, 01:59 AM
The only thing I see that is clearly wrong in your script is all the "#" before commands. Echo should not be preceded by #. Take those out and if will help ease your troubleshooting...

Hunter

Zetar
08-29-2003, 09:51 AM
I actually was using them for troubleshooting then commented them out with the #. Thanks though

Zetar
08-29-2003, 02:59 PM
I figured it out finally. Evidently the match command acts differently with a multi-line message. You would expect that it would look for text in the order you had the match statements, but that is not the case. In a multi-line note is looks for the first text match to appear based on all match statements, how confusing.

Well, that said, I'm sure people knew that already but that was the problem. I have attached the script in case anyone wants to look at it. It keeps track of you fletching ranks per wizard session.

Still a work in progress

Bobmuhthol
08-29-2003, 03:00 PM
That's what the problem was? I could have told you that. I thought it was a lot more complex.

Deathravin
08-30-2003, 02:25 AM
To keep a true counter of your ranks, it'd be better to use eScape, since it remembers variables

-Deathravin