Unexpected exception checking match strings 08/21/2017 08:43 PM CDT
Per the subject, I'm getting the following error when I run a new looting script I'm working on.

Script error[Unexpected exception checking match strings] near line 236


Is there a restriction on how many Label's I can have in one script? It's the only thing that makes sense. I can't find an error otherwise.

~Z
Reply
Re: Unexpected exception checking match strings 08/21/2017 08:44 PM CDT
Yes. The Wizard FE permits fewer, I believe, than Stormfront.

Which are you using?

Doug
Reply
Re: Unexpected exception checking match strings 08/21/2017 08:47 PM CDT
Yes. The Wizard FE permits fewer, I believe, than Stormfront.
Which are you using?
Doug


Stormfront.

~Z
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:12 PM CDT
I have a Wizard FE script that has at least a thousand labels in it so... you would need to be using a lot of labels.

There is also a limit to the number of match strings you can have in a single matchwait statement (around 25 I think) which seems like a potentially likely issue in a looting script and also consistent with your error message. Might take a look for that if you don't have more than 1,000 labels in your script.

-- Robert

You gesture at a colossal glaes-covered meteor.
The scream of tortured metal echoes around you as the lightning bolt strikes a colossal glaes-covered meteor.
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:16 PM CDT
:)

If that doesn't do it, send me the script, and I'll look it over. doug@play.net

Doug
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:23 PM CDT
I have a Wizard FE script that has at least a thousand labels in it so... you would need to be using a lot of labels.
There is also a limit to the number of match strings you can have in a single matchwait statement (around 25 I think) which seems like a potentially likely issue in a looting script and also consistent with your error message. Might take a look for that if you don't have more than 1,000 labels in your script.
-- Robert


That is most likely the problem. I have my GEM: Label which has 104 MATCH and MATCHRE's after it. Line 238 is the empty line immediately after my MATCHWAIT after that large label (assuming it's counting empty lines). I'm a bit confused though as to why it wouldn't work. I distinctly remember having a large GEM: label when I played years ago.

~Z
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:32 PM CDT
Drop it to 99 and test it again, just to confirm the hypothesis?

Doug
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:41 PM CDT
Drop it to 99 and test it again, just to confirm the hypothesis?
Doug


No dice. Same error, now on line 233.

~Z
Reply
Re: Unexpected exception checking match strings 08/21/2017 09:49 PM CDT
Doug,

I just sent it to you via email. Take a gander.

It would be easy enough for me to split the one label into several small sections, but I'd prefer not to do so to limit the amount of times I "Look" so I don't feel like I'm spamming the game.

~Z
Reply
Re: Unexpected exception checking match strings 08/22/2017 05:17 PM CDT
Found the error. Posting here in case it helps anyone. This line was the culprit, see if you can find the error.

MATCHRE QUARTZ /(blue|carnelian|cat's eye|citrine|rose|rainbow|tangerine|asterfire|dragonfire|dragon's-fang|leopard|oblivion| quartz/i

It was truly baffling me but my eye just happened to notice it accidentally. You can imagine it was hard to pick out when there are about 100 other lines of text surrounding it.

P.S. Thank you Doug and Robert for the assistance.

~Z
Reply
Re: Unexpected exception checking match strings 08/22/2017 09:37 PM CDT
Yep, good catch. I looked right past it, too.

Glad you got it cooking, looks like a useful script.

Doug
Reply
Re: Unexpected exception checking match strings 08/23/2017 04:33 PM CDT
Yep, good catch. I looked right past it, too.
Glad you got it cooking, looks like a useful script.
Doug


It's on its way to be. I'm working on the section now for all of the Creature Skins, and then lastly the uncommon loot that is valuable like blue and black crystals, statues, etc...

I know I could use Lich, but part of the fun for me is building scripts from scratch. My early experiences in scripting helped me with learning VBA in Excel which has definitely come in handy.

~Z
Reply