rock5 wrote:Just because it keeps printing that message doesn't necessarily mean it's stuck in that loop. It might be stuck somewhere else and the timed event is doing it's thing every second. Where did you start monitoring the event? How did you start it? If you comment out the line that starts the monitor does it still get stuck?
is there just 1 waypoint?
If so that would explain it, the startEVENTDetect is being called repeatedly, try putting that in the onload. The timer will take care of the rest, so only needs calling once.
Remember no matter you do in life to always have a little fun while you are at it
<onload>
function EVENTdetection()
repeat
cprintf(cli.yellow,"Inside EVENTdetection function; inside repeat ... until \n");
yrest(300);
local time, moreToCome, name, msg = EventMonitorCheck("EVENTdetect", "4,1")
if msg ~= nil then
if string.find(msg,"EventSTART") then
cprintf(cli.lightblue,"EventSTART received in PARTY chat. \n");
__WPL:setWaypointIndex(__WPL:findWaypointTag("START"));
partyCHATmsg = "EventSTART"
end
if string.find(msg,"EventSTOP") then
cprintf(cli.lightblue,"EventSTOP received in PARTY chat. \n");
__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
partyCHATmsg = "EventSTOP"
end
end
until moreToCome ~= true
end
function startEVENTDetect()
unregisterTimer("EVENTdetection");
printf("EVENT detection started\n");
EventMonitorStart("EVENTdetect", "CHAT_MSG_PARTY");
registerTimer("EVENTdetection", secondsToTimer(1), EVENTdetection);
end
startEVENTDetect()
</onload>