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

Quarry API

Started by Not_A_Pro, 02 April 2012 - 10:13 PM
Not_A_Pro #1
Posted 03 April 2012 - 12:13 AM
I'm new to programming and need help with this program i am trying to make for the experience(I know there is a built in command, excavate.) but i keep getting the, lua:1: attempt to index ? (a nil value) error. PLEASE HELP

function Quarry()
while turtle.detectDown() do
turtle.digDown()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
end
end
Advert #2
Posted 03 April 2012 - 12:18 AM
Try again after reading the stickies.