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

[lua] error with my code

Started by gl3nn, 01 September 2012 - 02:24 PM
gl3nn #1
Posted 01 September 2012 - 04:24 PM
what is wrong with this code it has something to do with line 47


x=1
function planten()
turtle.digDown()
turtle.select(1)
turtle.placeDown()
end
function coal()
if turtle.getFuelLevel() < 5
then turtle.select(2)
turtle.refuel(1)
end
end
for x = 1 , 5 do
planten()
coal()
turtle.forward()
end
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
x = 1
for x = 1, 5 do
planten()
coal()
turtle.forward()
end
turtle.turnRight()
turtle.forward()
turtle.turnRight()
x = 1
for x = 1, 5 do
planten()
coal()
turtle.forward()
end
x = 1
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
for x = 1 , 5 do
planten()
coal()
turtle.forward()
end
x = 1
turtle.turnRight()
turtle.forward()
turtle.turnRight
for x = 1 , 5 do
planten()
coal()
turtle.forward()
end
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
for x = 1 , 5 do
planten()
coal()
turtle.forward()
end
turtle.forward()
turtle.turnLeft()
x = 0
for x = 1 , 5 do
turtle.forward()
end
x = 3
for x = 3,16 do
turtle.select(x)
turtle.dropDown(64)
Lettuce #2
Posted 01 September 2012 - 05:14 PM
you're missing the parentesis on
turtle.turnRight()
If there are further issues, please tell us what your code is for, it'll be easier to fix that way. ALSO: you double posted. if you want to change the title, press "Edit" in the bottom right of your post, then "Use Full Editor," as it's impossible to delete without a moderator. Edit the title of your other post as "DELETE" then tell them it's a double post.
gl3nn #3
Posted 01 September 2012 - 05:25 PM
awh now i see it stupid me yeah i tried to edit the title but somehow i double posted i will change the first on to delete
and also its a program to farm wheat for me :)/>/>
Lettuce #4
Posted 01 September 2012 - 05:32 PM
Oh, everyone makes that mistake sooner or later. In fact, that was my very first post on these forums. You look for the hard to find stuff, and it's right in front of your nose. Glad I could help. :)/>/>