Openkore.com

OpenKore Forums
It is currently 22 Jan 2018, 11:58

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Sporadic syntax errors - help?
PostPosted: 19 Oct 2017, 15:18 
Offline
Noob
Noob

Joined: 19 Oct 2017, 14:35
Posts: 2
I've been writing up a quest macro for fun and learning the eventMacro system, and have encountered an occasional problem. My macros:

Code:
automacro onKill {
    SimpleHookEvent target_died
    call checkQuestCompletion
}

macro checkQuestCompletion {
    if ($.SimpleHookEventLastMonster =~ /Ghoul|Jakk|Nightmare/) goto checkCompletion
    stop
    :checkCompletion
        if (&questCompleteCount(62672,62673,62674) == 3) goto turnIn
        stop
    :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:

Code:
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.

Thanks!


Top
 Profile  
 
 Post subject: Re: Sporadic syntax errors - help?
PostPosted: 23 Oct 2017, 08:48 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 361
we got bug in that use this to patch https://github.com/OpenKore/openkore/pull/1124

that use it like that

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

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group