
Code
if turtle.getFuelLevel() < 1000 then
turtle.select(16)
turtle.refuel(64)
end
function refillMaterials()
slot = 1
repeat
if turtle.getItemCount(slot) < 1 then
slot = slot + 1
turtle.select(slot)
end
until
slot == 17
slot = slot - 16
noMaterials()
end
function noMaterials()
term.clear
term.setCursorPos(1,1)
print("Out of materials please bring me more")
print("press any key to continue...")
event1, param1 = os.pullEvent()
refillMaterials()
end
function placeBlock( times )
for i = 1, times do
turtle.placeDown()
turtle.forward()
end
end
function Corner()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
placeBlock(2)
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
placeBlock(1)
turtle.turnRight()
turtle.forward()
placeBlock(2)
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
end
function buildLayer()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
end
function BuildCylinder( height )
for i = 1, height do
buildLayer()
refillMaterials()
turtle.up()
end
end
print("How tall should the cylinder be?")
local height = tonumber(read())
turtle.select(1)
BuildCylinder(height)
Ok so it's saying = expected for line 21 but it's gibberish I don't need a equals there what's the matter with this I think I have just been staring at it to long can anyone tell me whats wrong?













