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

[Solved]Frame Quarry, Expected String, Number

Started by kofteistkofte, 30 March 2013 - 02:36 PM
kofteistkofte #1
Posted 30 March 2013 - 03:36 PM
I'm try to make a frame quarry controlled by a computer. I make a basic quarry API but when i try to run move function, get this error:
quarry:9: Expected string, number

The API:

Left = 1
Right = 2
Back = 4
Forw = 8
Down = 16
Up = 32
function move(sWay)
  rs.setBundledOutput("back",sWay)
  sleep(1,2)
  rs.setBundledOutput("back", 0)
end
function dig()
  rs.setBundledOutput("back", 64)
  sleep(1,2)
  rs.setBundledOutput("back", 0)
end
faubiguy #2
Posted 30 March 2013 - 03:41 PM
Are you sure you're passing a direction (number) to the move function when you call it?
kofteistkofte #3
Posted 30 March 2013 - 03:45 PM
I try to call with quarry.move(Left) etc.
electrodude512 #4
Posted 30 March 2013 - 03:51 PM
try quarry.move("Left") with quotes
faubiguy #5
Posted 30 March 2013 - 03:52 PM
Since the directions are also in the API, you need to do
quarry.move(quarry.Left)
kofteistkofte #6
Posted 30 March 2013 - 03:59 PM
Since the directions are also in the API, you need to do
quarry.move(quarry.Left)
it works. thanks.