Jump to content




what is wrong with my code?


  • You cannot reply to this topic
1 reply to this topic

#1 dcleondc

  • New Members
  • 70 posts

Posted 01 August 2012 - 04:30 AM

here is my code
--[[
Made by Dcleondc
8x8 farm
--]]
function turnRight()
    turtle.turnRight()
    turtle.moveForward()
    turtle.turnRight()
end
function turnLeft()
    turtle.turnLeft()
    turtle.moveForward()
    turtle.turnLeft()
end

function farm()
    turtle.digDown()
    turtle.select(1)
    turtle.placeDown()
    turtle.moveForward()
end
function done()
    turtle.select(16)
    while turtle.compareDown() do
    if turtle.compareDown() then
		    farm()
    else
		    turtle.moveForward()
    end
    end
end
for i=1,2 do
    for o=1,8 do
	    done()
    end
    turnRight()
    for p=1,8 do
	    done()
    end
    turnLeft()
end
all it does is turn right then give this error
test:9: attempt to call nil


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 01 August 2012 - 04:31 AM

There is no turtle.moveForward() function. You're thinking of turtle.forward().





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users