Posted 17 June 2013 - 10:36 AM
I'm making some Self Replicating turtles and am having trouble with retrieving a success/fail from the "turtle.craft()" function.
The program is giving me errors on line 18 saying, "an '=' was expected."
Here is my code:
The program is giving me errors on line 18 saying, "an '=' was expected."
Here is my code:
function cftComp()
turtle.up() -- Pane Start
turtle.turnLeft()
turtle.suck()
turtle.transferTo(2, 1)
turtle.transferTo(3, 1)
turtle.transferTo(4, 1) -- Extra piece for slot 1
turtle.transferTo(5, 1)
turtle.transferTo(6, 1)
turtle.transferTo(7, 1)
turtle.select(1)
turtle.drop()
turtle.select(4)
turtle.transferTo(1, 1)
turtle.select(1)
local compCraft = turtle.craft()
compCraft
if compCraft == false then -- *cough* Line 18 *cough*
print("Pane Crafting Has Failed")
print("Retrieving Pane")
turtle.select(2)
turtle.transferTo(1, 64)
turtle.select(3)
turtle.transferTo(1, 64)
turtle.select(5)
turtle.transferTo(1, 64)
turtle.select(6)
turtle.transferTo(1, 64)
turtle.select(7)
turtle.transferTo(1, 64)
turtle.select(1)
turtle.drop()
turtle.up()
turtle.suck()
turtle.transferTo(10,1)
turtle.drop()
print("Pane Retrieved")
else
print("Panes Crafted")
turtle.up()
turtle.transferTo(10, 1) -- Prepairs to craft computer
turtle.drop() -- Pane End
end
turtle.down() -- Smooth Stone Start
turtle.turnRight()
turtle.suck()
turtle.transferTo(2, 1)
turtle.transferTo(3, 1)
turtle.transferTo(4, 1) -- Extra piece for slot 1
turtle.transferTo(5, 1)
turtle.transferTo(7, 1)
turtle.transferTo(9, 1)
turtle.transferTo(11, 1)
turtle.select(1)
turtle.drop()
turtle.select(4)
turtle.transferTo(1, 1) -- Smooth Stone End
turtle.turnRight() -- Redstone Start
turtle.up()
turtle.suck()
turtle.select(4)
turtle.transferTo(6,1)
turtle.drop() -- Redstone End
turtle.select(6)
turtle.craft(1) -- Computer To Slot 6
turtle.down()
turtle.down()
turtle.turnLeft()
turtle.select(1)
end