for i = 1,100 do print(i) wait(1/100) end
This for loop was meant to reach a 100 in one second because it runs a 100 times and waits 1/100th of a second (0.01) each and 100*0.01 is 1 second. But the code actually reaches a 100 in 4 seconds for some reason when I stopwatch it. Can anybody explain why and also a solution?
for i = 1,100 do print(i) wait(0.01) -- Not the same as 1/100 (in strict Lua terms, but this is what you should be aiming for) end
You're welcome.
There is no solution.