This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
hummie's profile picture

attempt to call nill(big reactors + openperipheral

Started by hummie, 26 June 2015 - 06:51 PM
hummie #1
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
  • 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
KingofGamesYami #2
Posted 26 June 2015 - 09:08 PM
Did you mean net.callRemote instead of netcallRemote on line 11?
hummie #3
Posted 26 June 2015 - 09:37 PM
Oh sorry was overcomplicating the issue it seems.
I cant believe that took 4 hours to solve.
Thank you for your time.