Wait and Wait Line

Share your scripts and packages with other Mudlet users.
nowhereman
Posts: 3
Joined: Fri Feb 19, 2021 7:01 am

Re: Wait and Wait Line

Post by nowhereman »

I've changed:

Code: Select all

function wait_line_timer(name)
    for _,v in ipairs(threads[name][2]) do
        if v ~= nil and v[1] ~= nil then
          disableTrigger(v[1])
          killTrigger(v[1])
        end
    end
    wait_line_resume(name)
end
as when the triggers would fail to resolve their regex the timers would expired and next time I got a successful trigger, i'd get multiple triggers stacking up. It's a quick fix. I think it might be correct. Submitting here as both a bug report and a proposed solution.

-Nowhere.

zhenzh
Posts: 57
Joined: Fri Apr 17, 2020 2:23 am

Re: Wait and Wait Line

Post by zhenzh »

You are correct. Timeout function doesn't point to the correct trigger id.

But your fix can only process single line case, I have fixed it to afford both single line and multiple line cases:

Code: Select all

function wait_line_timer(name)
    for _,v in ipairs(threads[name][2]) do
        for _,i in ipairs(v) do
            disableTrigger(i)
            killTrigger(i)
        end
    end
    wait_line_resume(name)
end
The new version with the fix is uploaded, you can download it from the link in #1 post

Post Reply