3 posts
Posted 08 April 2013 - 11:35 PM
[Solved]
Hi, I have just started to muck around with these turtles and have encountred this problem.
Please HelpCode: http://pastebin.com/vNv96JE0Please Pm me if you find a solution.
[Solved]
8543 posts
Posted 09 April 2013 - 06:36 AM
Split into new topic.
Line 7 should use `turtle.detect()` not `turtle.detectForward()`.
2217 posts
Location
3232235883
Posted 09 April 2013 - 06:37 AM
turtle.detectForward() isnt a function
you want turtle.detect()
169 posts
Posted 09 April 2013 - 06:51 AM
Also, too many "end"s in your functions. And get rid of the "do"s in your function definitions.
1852 posts
Location
Sweden
Posted 09 April 2013 - 12:14 PM
Uhmm… Just do this
--[AutoFloorv1]--
print "Starting"
function detectwall() --Removed 'do' here
if not turtle.detect() then --Used 'not' instead of '== false' since they are pretty much the same
turtle.forward()
else
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
end
--[[
Removed an 'end' here since you just need 2
One for the function and one for the 'if'
]]--
function placeblock()
if not turtle.detectDown() then
turtle.placeDown()
else
turtle.forward()
end
end
while true do
placeblock()
detectwall()
end
Think that's correct..
3 posts
Posted 09 April 2013 - 05:31 PM
Thank you all for input will remember these things for next time. :D/>