Posted 27 October 2016 - 12:57 PM
So basically
I want to redo the code to do a second layer but I need to change the Argument list can I redefine the function so that It does not effect earlier code.
local function C()
-- C Boot
term.clear()
term.setCursorPos(1, 1)
term.write("Stage C")
turtle.turnRight()
turtle.place()
turtle.turnLeft()
turtle.back()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
-- Functions
local function x()
turtle.turnLeft()
turtle.back()
turtle.turnRight()
end
local function moveBackAndPlace(n)
for i = 1, n do
turtle.back()
turtle.place()
end
x()
end
-- Arguement List
a = {5,4,3,3,1,2,1,2,1,1,1,1,1}
for i,v in ipairs(a) do
moveBackAndPlace(v)
end
end
I want to redo the code to do a second layer but I need to change the Argument list can I redefine the function so that It does not effect earlier code.