Posted 05 December 2013 - 06:00 PM
So I'm trying to make a loop for my auto smelter but it only runs once then quits it's not actually looping?
print("How many ingots would you like to smelt?")
num = tonumber(io.read())
term.clear()
term.setCursorPos(1,1)
print("Ok, Smelting " ..(num).." ingots.")
for i=1, num do
rs.setOutput("top",true)
sleep(2)
rs.setOutput("top",false)
end
print("finished making your ingots")
print(" restarting…")
sleep(2)
it only does this once. so even if I type 500 it does the loop "once" then stops. Could anybody possibly tell me what I'm doing wrong?
print("How many ingots would you like to smelt?")
num = tonumber(io.read())
term.clear()
term.setCursorPos(1,1)
print("Ok, Smelting " ..(num).." ingots.")
for i=1, num do
rs.setOutput("top",true)
sleep(2)
rs.setOutput("top",false)
end
print("finished making your ingots")
print(" restarting…")
sleep(2)
it only does this once. so even if I type 500 it does the loop "once" then stops. Could anybody possibly tell me what I'm doing wrong?