Jump to content




How To Enter Arguments While In Lua?[Solved]


  • You cannot reply to this topic
4 replies to this topic

#1 TheFireMines1

  • Members
  • 5 posts

Posted 21 July 2013 - 09: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?

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 July 2013 - 11:44 PM

Split into new topic.

Just do this:

shell.run("excavate 1")


#3 TheFireMines1

  • Members
  • 5 posts

Posted 22 July 2013 - 12:09 AM

Thanks!

#4 diegodan1893

  • Members
  • 164 posts
  • LocationSpain

Posted 22 July 2013 - 05:09 AM

You can also do
shell.run("excavate", "1")


#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 22 July 2013 - 09:54 AM

You can, but it's unnecessary. Far simpler to just put the command in whole if you know the entire command already.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users