Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

badcode9

Members
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by badcode9

  1. Yes, options as you describe them, as well as input parameters such as numbers or strings that can be used by the program. eg. a farming program might accept the following: "farm 9 9" The provided digits might indicate the dimensions to farm within.
  2. To have any program run when the computer boots, you will need to call it from an autorun script. First, what I would suggest is to place your program in the "/usr/bin" directory, that way it can be called by name without specifying the directory path. This is optional but I find it useful. Next, create a new file in the root "/" directory, called "autorun.lua". In this script, use the following code, supposing your program name was "pass.lua". Then reboot it too test. os.execute("pass.lua") As far as preventing program termination, I have found one post that describes a method involving c
  3. I am having a similar issue with accessing the robots internal inventory, but it doesn't appear that there is a dedicated function. I want to count the number of slots in the robots inventory, and anticipated that the function, getInventorySize(side: number): number or nil[, string] would work. However, when I use this function specifying "sides.back", I get an unsupported sides error (like Jalopy43 did). Does anybody know how I can accomplish this without the need for an additional block? Thanks!
  4. jhagrid77, Would you have any insight on how to properly use program arguments? An example script would be phenomenal. Cheers
  5. Hi The Duke of Crawley, I was actually working on something very similar as well this weekend. I opted to use the term.read() function, which allows you to mask the input. I don't think io.read() does this.. Would be cool if you could link the documentation for that function. Here's a snippet of my code. I'd be happy to share the whole program with you if you'd like. answer = text.trim(term.read(nil, false, nil, "*")) -- Masking input characters; trim newline Note that the one downside to using term.read() is that it will also append a "\n" newline to your input which can cause the
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.