title: Lua loading variables when calling program ~ Parameter?
body: <p>I recently got into Computer Craft (Mod for Minecraft) you can code the computers with lua.</p>
  
  <p>I want to go "water status" and it will load "water" and then set a variable to "status" or any other word/string in its place so I can use it for anything. I guess you would call that a parameter?</p>
  
  <pre><code>os.run( environment, prgmpath, arguments ) 
  </code></pre>
  
  <p>I don't understand what environment is. prgmpath is water and the argument would be status?
  I'm just unsure how to grab those arguments from that.</p>
  
  <p>So yeah, I'm quite confused =/</p>
  
  <p>Tried to explain it best I could, thanks,
  Jazza</p>
  
  <p>After searching around, I think I found my answer.</p>
  
  <pre><code>lua water arg1
  </code></pre>
  
  <p>Goes in the command line</p>
  
  <pre><code>derp = arg[2]
  </code></pre>
  
  <p>Goes in the file?</p>
  
  <p>EDIT: After lurking around some more, I found out that:</p>
  
  <pre><code>derp = ...
  print(derp)
  </code></pre>
  
  <p>In the file and:</p>
  
  <pre><code>file hi
  </code></pre>
  
  <p>It printed hi, so I guess that works, but I can't seem to add any more D=</p>