Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
79 someone asked for help with a cc script and I sort of missed the error
I commented out the cc specific stuff so I could run it with a lua interpreter

Code:
local arg = {...}
local legth
if (arg[1] == nil) then
    length = 10
else
    length = arg[1]
end

for I = 0, length do
    if i < length then
        --turtle.dig()
        --turtle.digDown()
        --turtle.forward()
        i=i + 1
    else
        --turtle.turnRight()
        --turtle.dig()
        --turtle.digDown()
        --turtle.forward()
        --turtle.turnRight()
        --turtle.digDown()
    end
end
I taught the error would be in i=i+1 as i was not set, the error is in fact in i < length
so close yet so far away......