I am trying to decrease the for loop counter when starting a loop. Unfortunately, Lua does not seem to allow this. This piece of code should work forever:
for i = 1, 100 do
print (i)
i = i - 1
end
but actually it just prints a series of 1-100. Is it for design? If so, how to reduce the duty cycle counter (for example, because the current cycle has been disqualified and must be run again)?
source
share