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

Code missing a = expected

Started by Brandonlxd0, 15 June 2013 - 07:36 PM
Brandonlxd0 #1
Posted 15 June 2013 - 09:36 PM

mPeripheral=peripheral.wrap("right")
mPeripheral.setAutoCollect(true)
while true do
if not turtle.attack() then
for i = 1,16 do
if turtle.getItemCount(i) >0 then
turtle.select(i)
turtle.dropDown()
else
break
end
end
end 
if mPeripheral.getLevels() >=30 then
turtle.turnRight()
turtle.turnRight()
turtle.select(2)
turtle.dropDown()
turtle.select(1)
turtle.dropDown()
turtle.suck()
turtle.transferTo(2, 1)
turtle.drop()
turtle.select(2)
mPeripheral.enchant(30)
turtle.drop()
turtle.select(1)
turtle.turnRight
turtle.turnRight
end
end turtle.select(1) end 
Edited by
Lyqyd #2
Posted 17 June 2013 - 01:28 PM
Split into new topic.

turtle.turnRight requires parentheses just like every function. Add parentheses to the two instances of it near the bottom of your code, so that they are `turtle.turnRight()`.