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

Attempt to index ? (a nil value)

Started by Beedo_, 17 May 2015 - 08:50 AM
Beedo_ #1
Posted 17 May 2015 - 10:50 AM
Hey guys, I need a little help… I downloaded direwolf20's button api and his demo program, and after testing it to see if it worked, i moved around and got rid of some buttons from the demo program. didnt edit the button api except for changing the "peripheral.wrap" to "right", and now im getting "button:63: attempt to index ? (a nil value)" whenever i try to click the button on the monitor…

Button API- pastebin.com/8Gbj3HmP
Demo- pastebin.com/HRbMF1Eg
Bomb Bloke #2
Posted 18 May 2015 - 12:31 AM
You appear to have linked two nearly identical copies of the same API. The only change that stands out to me is the first line.

Line 63 would throw that error if you attempted to toggle a button which has somehow been deleted from memory. Difficult to say without seeing your code.