So i grabbed DireWolf20's reactor code as I have a very similar set up to his and I am garbage at coding.
But when I run the program I get the error code "reactor:304: attempt to index ? (a nil value)"
This is the paste bin
http://pastebin.com/A7v2sKyW <<Reactor
http://pastebin.com/XBbMUYNn <<Button
I know the problem lies on line 304 of the reactor script, but from what I'm seeing there is nothing wrong with it. any help would be apprecieated
Just need a little help
Started by Draminicus, Sep 24 2015 06:55 AM
2 replies to this topic
#1
Posted 24 September 2015 - 06:55 AM
#2
Posted 24 September 2015 - 03:33 PM
It appears the peripheral.find call on line 3 failed to find a peripheral named "tile_blockcapacitorbank_name", or the peripheral it wrapped does not have the function called on line 304. I would assume that direwolf20s code is either made for a different version, you do not have openperipherals installed, or you do not have the peripheral attached as it is expecting it to be.
A few things you can do to help us figure out what is going on:
This can be run anywhere:
Put this code right after line 3 in your program:
Those two things will help us see if the name of the peripheral has changed between versions, and if it is even connected. The second one will list all of the methods that the peripheral has if it does exist.
A few things you can do to help us figure out what is going on:
This can be run anywhere:
print(textutils.serialize(peripheral.getNames())) --Tell us what this prints
Put this code right after line 3 in your program:
if p then
for k,v in pairs(p) do
print(k)
end
end
Those two things will help us see if the name of the peripheral has changed between versions, and if it is even connected. The second one will list all of the methods that the peripheral has if it does exist.
#3
Posted 25 September 2015 - 03:41 AM
Thank you so much for the help, after setting it from .find to .wrap and telling it the exact name of the cap bank it worked.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











