help with turtle program

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Christian Sinclair

New Member
Jul 29, 2019
74
0
0
Hi there, I'm trying to program my turtle with a basic logger program. and after having written out the code, and trying to run it, i get an error saying the turtle was expecting a string, or something like that. I have no idea what I'm doing with these things, and the code wasn't my own, so could anyone help me out?
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
not without actually seeing the code

but it sounds like either they forgot the quotes or a tostring()
 

Christian Sinclair

New Member
Jul 29, 2019
74
0
0
umm, here it is
function makeTree()
turtle.select(1)
turtle.place()
turtle.select(2)
turtle.place()
end

function cutTree()
turtle.dig()
turtle.forward()
while turtle.detectUp() do
turtle.digUp()
turtle.up()
end
while not turtle.detectDown() do
turtle.down()
end
turtle.back()
end

function depositWood()
turtle.select(3)
turtle.dropDown()
end

for i = 1, 64 do
makeTree()
cutTree()
depositWood()
end

to get it to run i just type in the file name, which i set as TreeFarm. right?

link to the code in a proper layout
http://turtlescripts.com/file/gjdh2w
 

SkyBoy96

New Member
Jul 29, 2019
100
0
0
What does the error message say? It would be something like this:
Number:error
The error tells you what broke, the number tells you where it broke. Find the number, and you know what line threw the error