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

help with turtle program

Started by tdog21, 26 July 2012 - 09:55 PM
tdog21 #1
Posted 26 July 2012 - 11:55 PM
my code:

while false do
if turtle.detect() then
turtle.forward()
turtle.drop(1)
turtle.forward()
turtle.drop(1)
turtle.forward
turtle.drop(1)
turtle.turnleft
end
end



and my error:

bios:206: [string "cookieparty"]:4: unexpected symbol –i got a fix for this now i have this error

bios:206 [string "cookieparty"]:8: '=' expected

same error as above accept the 8 is a 10


im trying tomake my turtle move forward and drop an item three times then turn left endlessly any help is apreciated and if i need to add anything to the code for it to work properly please let me know
brett122798 #2
Posted 27 July 2012 - 12:01 AM
I don't think you need brackets.


while false do
if turtle.detect then
turtle.forward()
turtle.drop(1)
turtle.forward()
turtle.drop(1)
turtle.forward
turtle.drop(1)
turtle.turnleft
end
end
tdog21 #3
Posted 27 July 2012 - 12:06 AM
ok i'll try it thanks

EDIT

ok i just tried that code above and got this error i really don't understand the errors

bios:206 [string "cookieparty"]:8: '=' expected
brett122798 #4
Posted 27 July 2012 - 12:14 AM
ok i'll try it thanks

EDIT

ok i just tried that code above and got this error i really don't understand the errors

bios:206 [string "cookieparty"]:8: '=' expected
I don't understand turtles very much, I have no clue why the error would be saying that. All I know is, you fixed your first problem. Better edit your post to explain this problem.

EDIT: WAIT! Found it. Here:


while false do
if turtle.detect then
turtle.forward()
turtle.drop(1)
turtle.forward()
turtle.drop(1)
turtle.forward()
turtle.drop(1)
turtle.turnleft()
end
end
Noodle #5
Posted 27 July 2012 - 12:15 AM
if turtle.detect() then
brett122798 #6
Posted 27 July 2012 - 12:17 AM
if turtle.detect() then
I don't think that's the error, but I found 2 more errors, just edited my last post.
Lyqyd #7
Posted 27 July 2012 - 01:11 AM
The L in turtle.turnLeft needs to be capitalized.
Noodle #8
Posted 27 July 2012 - 01:22 AM
To new coders: get used to camelCasing.