Posted 15 September 2012 - 12:57 PM
I made this program: (lights)
This is xcor:
This is the error I get:
I try to call the function clear in xcor, but it gives me the error
yes i know there is already a clear, but I type xcor.clear(1, 1) so it should not be using term.clear()
help?
Spoiler
print("On/Off")
x = io.read()
if x == "On" then
rs.setOutput("back",true)
end
if x == "Off" then
rs.setOutput("back",false)
end
xcor.clear(1, 1)
Spoiler
function getTree()
while turtle.detect() do
turtle.dig()
print("Digging the block")
turtle.digUp()
print("Digging the block")
turtle.up()
print("Moving up")
end
while not turtle.detect() and not turtle.detectDown() do
turtle.down()
print("Moving down")
end
term.clear()
term.setCursorPos(1,1)
print("Tree Cut!")
end
function cobbleGen()
while true do
if turtle.detect() then
turtle.dig()
end
itemcount = turtle.getItemCount(16)
if itemcount == 64 then
for i=1,16 do
turtle.select(i)
turtle.dropUp()
end
turtle.select(1)
end
end
end
function buildStair()
while turtle.detect() do
turtle.up()
end
turtle.down()
turtle.down()
turtle.back()
turtle.place()
while not turtle.detectDown() do
turtle.back()
turtle.down()
turtle.place()
end
print("Done!")
end
function buildPortal()
print("Please insert 10 obsidian in slot 1")
print("[ENTER] to continue")
os.pullEvent()
term.clear()
term.setCursorPos(1,1)
turtle.select(1)
turtle.up()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()
print("Portal Built!")
end
function clear(arg1, arg2)
term.clear()
term.setCursorPos(arg1, arg2)
end
Spoiler
lights:9: attempt to call nil
yes i know there is already a clear, but I type xcor.clear(1, 1) so it should not be using term.clear()
help?