Posted 28 March 2013 - 11:28 AM
So i have got a function
now what I was wondering is how I could pass an argument to it like placeBlock(5). How would I go about doing this?
Edit: Maybe it would help if I listed my full code
function placeBlock()
turtle.placeDown()
turtle.forward()
now what I was wondering is how I could pass an argument to it like placeBlock(5). How would I go about doing this?
Edit: Maybe it would help if I listed my full code
if turtle.getFuelLevel() < 1000 then
turtle.select(16)
turtle.refuel(64)
end
function placeBlock()
turtle.placeDown()
turtle.forward()
end
function Corner()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
placeBlock(2)
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
placeBlock(1)
turtle.turnRight()
turtle.forward()
end
function buildCylinder()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
placeBlock(5)
Corner()
end
buildCylinder()