Is it this?
a=0
for i=0, 1, .1 do
a=a+i
end
or this
for i=0, 1 do
a = a + 1
end
Is it this?
a=0
for i=0, 1, .1 do
a=a+i
end
or this
for i=0, 1 do
a = a + 1
end
They both can work the same
if you do a = a + 1 then heres example how it would work
for i=0, 10 do
a = a + 1
end
-- what this does is it will add a + 1, 10 times
same thing as doing this which i would recommend to use instead (better practice, more efficient)
for i=0, 10, 1 do
a = i
end
-- what this does is it adds a by 1 to 10 like the last one the reason it has 1 at the end is how much it skips by to get to 10
if it was 2 then the output would be this
2, 4, 6, 8, 10
This discussion is preserved as it was. New answers, comments, and votes are closed.