This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
chowder64's profile picture

loop help

Started by chowder64, 04 May 2012 - 08:50 PM
chowder64 #1
Posted 04 May 2012 - 10:50 PM
i am trying to make a loop with a variable so that i can make it loop n'th times
so if i put in the computer "10" it would complete the loop 10 time before moving on to the next action.
(i have no code atm)
MysticT #2
Posted 04 May 2012 - 11:42 PM
Try a for loop:

for i = 1, <end> do -- replace <end> with the number of times to loop
  -- your code
end
chowder64 #3
Posted 05 May 2012 - 11:49 AM
thank you for telling me.