Posted 06 January 2013 - 07:08 AM
I need help with this program, i getting this error:
bios:140: vm error: java.lang.ArrayIndexOutOfBoundsException: 256
program check:
if turtle.compare() == false then
turtle.select(2)
if turtle.compare() == false then
turtle.select(3)
if turtle.compare() == false then
turtle.select(4)
if turtle.compare() == false then
turtle.select(5)
if turtle.compare() == false then
turtle.select(6)
if turtle.compare() == false then
turtle.dig()
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
program turn:
turtle.digDown()
turtle.down()
i = 1
shell.run("check")
else
i = i+1
turtle.turnRight()
shell.run("check")
end
bios:140: vm error: java.lang.ArrayIndexOutOfBoundsException: 256
program check:
Spoiler
turtle.select(1)if turtle.compare() == false then
turtle.select(2)
if turtle.compare() == false then
turtle.select(3)
if turtle.compare() == false then
turtle.select(4)
if turtle.compare() == false then
turtle.select(5)
if turtle.compare() == false then
turtle.select(6)
if turtle.compare() == false then
turtle.dig()
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
else
shell.run("turn")
end
program turn:
Spoiler
if i==4 thenturtle.digDown()
turtle.down()
i = 1
shell.run("check")
else
i = i+1
turtle.turnRight()
shell.run("check")
end