PDA

View Full Version : Match Not working in litch



Tenzle
05-17-2007, 03:36 PM
Scribed:
waitrt?
fput "turn grinder"
match "Main", "You decide the safest thing to do now is"
match "Toothpick", "twists in your hand"
match "Toothpick", "Toothpick"
match "Perfect", "You smile as you realize that this piece is the very best that you can create"
match "RenewWork", "this workshop has expired"
match "Donee", "#{script.vars[5]}"
matchwait

so this is a slightly modified version of the lich repository crafting rankup script.

The problem is that it simply will not ever catch the perfect line. No matter what I try it always ends up going to the last match. Now does anybody have any idea why this might be happening. As far as I know matching is short circuiting and it'll take the first match it sees.

Shaelun
05-19-2007, 07:52 PM
I looked through the "match" related code... and I don't see how there could be a problem. That doesn't mean there isn't a problem, but everything looks right and the test script has no problems with the matches it uses (it should be included in the install, `test.lic' if you're curious).

The only thing I can think of is that you aren't providing five variables on the command line, and it's matching against nothing for the last one... which could conceivably mean it would match anything. Make sure that isn't what's happening.

Tenzle
05-23-2007, 12:43 PM
Nope all 5 variables are there. its just really strange that it cant seem to catch the line about a perfect craft.

Shaelun
05-24-2007, 06:49 PM
It's definitely strange: if you want to debug it, try using the "echo.lic" script to get a good look at what the script is seeing. If the line the script sees isn't identical to what you see in your game window, let me know the details and I can fix it.

If they are identical and it's still not working... well, let me know about those details I guess and I can try to figure out what's screwed up.