21 posts
Posted 15 September 2013 - 03:48 PM
I have been building a turtle farming program and an api to go with it but everytime I run the code, it misses a go down function which screws up the whole thing.
Program:
http://pastebin.com/NY8skHUaAPI:
http://pastebin.com/h4teLJDJ
500 posts
Posted 15 September 2013 - 09:45 PM
Could you describe the problem you are experiencing in a bit more detail please?
162 posts
Posted 15 September 2013 - 10:17 PM
I am not sure why that would skip. Replace "turtle.down()" with:
repeat
term.setCursorPos(1,1)
print("Something is blocking my way!")
sleep(1)
term.clear()
until turtle.down()
EDIT: You could probably use a for loop instead of your repeat loop as well, e.g.,
for x = 1,2 do
<your code>
end
21 posts
Posted 15 September 2013 - 10:43 PM
Could you describe the problem you are experiencing in a bit more detail please?
What it is doing is when it is suppose to go down it just goes of forward like something it blocking its path but nothing is in front of it.
21 posts
Posted 15 September 2013 - 10:52 PM
It works perfectly now, thanks for all the help! I had miscounted the number of times it had to plant.