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

[Error] trying to call shell.run()

Started by lord_darkis, 11 September 2012 - 02:44 AM
lord_darkis #1
Posted 11 September 2012 - 04:44 AM
I'm trying to make a my turtle like a kind of quarry. Im using read() to read the size of the quarry then using shell.run() to run excavate then the size.

Here Is my code:


term.clear()
term.setCursorPos(1,1)
turtle.refuel()
print ("QuarryBot Online")
write ("Enter Quarry size: ")
size = read()
shell.run(excavate, qsize)

and my error exactly is:

shell:65: bad argument: string expected, got nil
ComputerCraftFan11 #2
Posted 11 September 2012 - 04:56 AM
You have to put quotes around excavate ("") and rename qsize to size (you had a typo)
lord_darkis #3
Posted 11 September 2012 - 04:59 AM
You have to put quotes around excavate ("") and rename qsize to size (you had a typo)

Thank you :D/>/>
hego555 #4
Posted 11 September 2012 - 07:28 AM
Just for future reference, when a error happens it tells you the line causing it… just focus on the line you will find it your self :D/>/>