That was pretty simple, if you take the time to read it carefully. Essentially, though, a while loop will only keep looping
while its condition evaluates true. So a loop like:
x = 100
while x == 100 do
x = x + 1
end
Will only run once. The first time the loop starts, x is 100, so its condition ( x == 100 ) is true. Then in the loop body, we add 1 to x, making it 101. When the loop tries to start again, its condition evaluates to false (101 does not equal 100), so it skips the loop and moves on. Your next attempt was something like:
x = 100
while x > 99 do
x = x + 1
end
while x > 199 do
x = x + 1
end
The issue here is that your first loop will never end. When the first loop begins, x is greater than 99. Since the loop adds one to x, it will
always be greater than 99, so that first loop will keep looping forever. That code will never reach the second loop. So we suggested you use a for loop instead. For loops can be made to loop a specific number of times, which is what it seems like you're looking for. Something like this:
for i = 1, 100 do --# Loop from one to one hundred
turtle.forward()
end