Posted 24 February 2020 - 11:53 PM
Once more I am asking for your divine guidance with a problem of peripherals.
namely: how do I automatically wrap them when -the computer turns on or when a new peripheral is attached via wired modem.
so far I've come up with using string.find() to compare things, but peripheral.getNames() gives a table so that's more manipulation than I know. besides, trying to detect witch reference instance was found is rather difficult for me.
case and point: this is what I'm trying to accomplish.
P.S. I'm using cc:tweaked if it wasn't allready obvious
with regards
-qwerty
namely: how do I automatically wrap them when -the computer turns on or when a new peripheral is attached via wired modem.
so far I've come up with using string.find() to compare things, but peripheral.getNames() gives a table so that's more manipulation than I know. besides, trying to detect witch reference instance was found is rather difficult for me.
case and point: this is what I'm trying to accomplish.
reference = {chest, crate, cache}
List = peripheral.getNames()
--code I have no idea on how to construct--
pointer = peripheral.wrap(*inventory from list*)
reference_id** = pointer
-- ** > the reference and id are to be used as pointers to selected inventory --
P.S. I'm using cc:tweaked if it wasn't allready obvious
with regards
-qwerty