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

How To Enter Arguments While In Lua?[Solved]

Started by TheFireMines1, 21 July 2013 - 08:44 PM
TheFireMines1 #1
Posted 21 July 2013 - 10:44 PM
So I've been trying to run programs in code (aka shell.run) and some programs need arguments(in my case excavate)
im trying to make a turtle do this:
excavate 1
but do it in rows using a code kinda like this:
shell.run("excavate(1)")
but obviously that doesn't work, any help?
Lyqyd #2
Posted 22 July 2013 - 12:44 AM
Split into new topic.

Just do this:


shell.run("excavate 1")
TheFireMines1 #3
Posted 22 July 2013 - 01:09 AM
Thanks!
diegodan1893 #4
Posted 22 July 2013 - 06:09 AM
You can also do

shell.run("excavate", "1")
Lyqyd #5
Posted 22 July 2013 - 10:54 AM
You can, but it's unnecessary. Far simpler to just put the command in whole if you know the entire command already.