• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Lua - For-loop bug (1 Viewer)

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
I found this bug and Coldblooded recommended that I report it so devs can have a look at it.

Oh yes, this seems like a bug. I did the same thing and it works as expected for a few rotations then moves on past. I eliminated the cmd calls, and got the same result.
Lua:
local mq = require('mq')

for i = 1, 1000 do
    print(i)
    mq.delay(250)
end
I would put an issue up so the devs can track this.
 
Oh, right, sorry about that.

Expected is a loop that iterates 1000 times with a quarter-second delay within each iteration, but it only does that until iteration 60:ish, then it zooms past the delay in milliseconds. No errors, no crashes. Just finishes without the delays.

Original thread where the bug was discovered: https://www.redguides.com/community/threads/issue-with-nested-for-loop.89869/
 
Last edited:
What happens if you put the delay first?
Yeah, that workaround was mentioned in the original post. Having the delay "not last" in the inner loop, makes it work as expected, but it is still considered a bug, I think. Anyway, switching place on the print and the delay, makes it behave as you would expect. The issue seems to be fairly complex, and nothing that will be solved right away.
 
Lua - For-loop bug

Users who are viewing this thread

Back
Top