15 posts
Posted 29 July 2012 - 04:11 PM
Hello, I have been working with CC and lua for 2 days now and I am wondering if there are any good tutorials out there.
I've read "recommended tutorials, and I've learned not that much.
I'm looking for a tutorial about perhiperials and using arguments.
If you will, you can tell me how you learned about these things, and help me. Thank you!
::Edit:: btw, By arguments I mean arguments like in the monitor program etc.
259 posts
Location
Australia
Posted 29 July 2012 - 04:33 PM
So your wondering how to change print size on monitors and how to call the peripheral?
26 posts
Posted 29 July 2012 - 07:48 PM
So your wondering how to change print size on monitors and how to call the peripheral?
I'd love to know this too. I'm in the same boat as Emilgardis.
15 posts
Posted 29 July 2012 - 07:53 PM
So your wondering how to change print size on monitors and how to call the peripheral?
I want to just have a good tutorial on peripherals and params.
Like this,
> Get 3 wood -- would give 3 wood
> Get 9 iron -- would give 9 iron
And the code would set the quantity set as x and the item as y and do the code from there
288 posts
Location
The trashcan where all Undertale trash is
Posted 04 October 2012 - 06:20 PM
A way to access arguments is declaring a table with … in it, like this:
local tArgs = {...}
Then you could check to see how many arguments there are:
local tArgs = {...}
if #tArgs > 2 or #tArgs <= 1 then
error("Not enough/Too many arguments!")
end
So, you want to access them? Well two methods are A. Compare to a value manually, or B. Cycle through a table of elements. I'm going to show B.
local tArgs = {...}
local tItems = {"wood","iron"}
if #tArgs > 2 or #tArgs <= 1 then
error("Not enough/Too many arguments!")
end
local function dispenseStuff(number)
--do stuff to dispense the item
end
for i,v in pairs(tItems) do
if tArgs[2] == v then
dispenseStuff(tArgs[1])
break
end
end
48 posts
Location
San Jose, CA
Posted 05 October 2012 - 10:16 PM
I have a ton of tutorials on peripherals in my youtube series. There's one on monitors specifically. See sig