Simplest example:
local local_i = 0
repeat
local local_a = local_i + 1
local_i = local_i + 1
print ("local_i = "..local_i)
until local_a >= 10
Outputs: (whitespace for readability)
local a = 0
repeat
local b = a + 1
a = a + 1
print ("local_i = "..a)
until local_a >= 10 --local not updated!
It can be worked around by creating a local variable outside the loop, but this should not be needed:
local local_i = 0
local local_a = 0
repeat
local_a = local_i + 1
local_i = local_i + 1
print ("local_i = "..local_i)
until local_a >= 10
Simplest example:
Outputs: (whitespace for readability)
It can be worked around by creating a local variable outside the loop, but this should not be needed: