I was wondering why putting a for loop inside another loop doesn't work as expedited?
Example of what I mean
Output
a : 10 b : 5 c : 2
a : 7 b : 5 c : 2`
a : 4 b : 5 c : 2
a : 1 b : 5 c : 2
Script:
for a = 10,1,-3 do b = 5,1,-2 -- a = c = 2,1,-1 print("a : "..a.." b : "..b.." c : "..c) end
Why does this happen?
You didn't actually put another loop inside at all. You merely initiated variables and declared them
Here is a fix:
for a = 10,1,-3 do for b = 5,1,-2 for c = 2,1,-1 print("a : "..a.." b : "..b.." c : "..c) end end end