Jump to content




[Error] trying to call shell.run()


3 replies to this topic

#1 lord_darkis

  • New Members
  • 14 posts
  • LocationCanada

Posted 11 September 2012 - 03: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


#2 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 11 September 2012 - 03:56 AM

You have to put quotes around excavate ("") and rename qsize to size (you had a typo)

#3 lord_darkis

  • New Members
  • 14 posts
  • LocationCanada

Posted 11 September 2012 - 03:59 AM

View PostComputerCraftFan11, on 11 September 2012 - 03:56 AM, said:

You have to put quotes around excavate ("") and rename qsize to size (you had a typo)

Thank you :D/>

#4 hego555

  • Members
  • 89 posts

Posted 11 September 2012 - 06: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/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users