I have a lua script where I want to run a long running operation and update the user as it progresses. So I have a loop and each iteration of the loop prints out progress.
...
for k in pairs (blah) do
print ("processing step " .. k)
...
end
The problem is that none of the print statements show up until the loop is done and I can't figure out a way to flush the output. I read that lua print is actually overridden by MushClient to do world.Note or the equivalent.
My question is, how can I write this loop to print out immediately?
...
for k in pairs (blah) do
print ("processing step " .. k)
...
end
The problem is that none of the print statements show up until the loop is done and I can't figure out a way to flush the output. I read that lua print is actually overridden by MushClient to do world.Note or the equivalent.
My question is, how can I write this loop to print out immediately?