Sporadic syntax errors - help?
Page 1 of 1

Author:  Durmiun [ 19 Oct 2017, 15:18 ]
Post subject:  Sporadic syntax errors - help?

I've been writing up a quest macro for fun and learning the eventMacro system, and have encountered an occasional problem. My macros:

automacro onKill {
    SimpleHookEvent target_died
    call checkQuestCompletion

macro checkQuestCompletion {
    if ($.SimpleHookEventLastMonster =~ /Ghoul|Jakk|Nightmare/) goto checkCompletion
        if (&questCompleteCount(62672,62673,62674) == 3) goto turnIn
        do ai manual
        do move geffen 77 76
        do talknpc 75 78 r1 r1
        do talknpc 75 78 r0 r3
        do ai auto

About 80% of the time, it works with no issue. Sometimes, however, I receive a syntax error on the following line:

if ($.SimpleHookEventLastMonster =~ /Ghoul|Jakk|Nightmare/) goto checkCompletion

I thought initially that the SimpleHookEvent might be triggering but not populating the $.SimpleHookEventLastMonster variable... but if I log that variable to the console, it hasn't been blank yet.

Is there something that I'm missing?

The code is working, as I said before... I just would like to remove the sporadic errors, if possible.


Author:  Mortimal [ 23 Oct 2017, 08:48 ]
Post subject:  Re: Sporadic syntax errors - help?

we got bug in that use this to patch

that use it like that

if (&strip($.SimpleHookEventLastMonster) =~ /Ghoul|Jakk|Nightmare/) {

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group