Posted 26 June 2015 - 08:51 PM
I tried to automatically wrap the peripherals and put them into a table so they could be used later.
When I tried to reference to the reactor it said tht it needed a string.
Because of that I tried to put the peripheral into a string this also failed.
Output: http://www.hummiesnotepad.nl/screenshots/2015-06-26_21-48-17.jpg
thanks in advance
When I tried to reference to the reactor it said tht it needed a string.
Because of that I tried to put the peripheral into a string this also failed.
Output: http://www.hummiesnotepad.nl/screenshots/2015-06-26_21-48-17.jpg
- reactors = {}
- net = peripheral.wrap("back")
- r = peripheral.wrap("BigReactors-Reactor_2")
- for i, v in pairs(peripheral.getNames()) do
- sleep(0.5)
- print(v)
- –name = string.find(v, 1, 19)
- if(string.match(v, "BigReactors.Reactor")) then
- reactors[i] = v
- print(reactors[i])
- print(netcallRemote(reactors[i], "getActive"))
- else
- print("didnt match!")
- end
- end
- –print(net.callRemote(reactors[2], "getActive")
thanks in advance