r/ComputerCraft • • Dec 18 '15

How to fix peripheral api throwing error: "no such method"?

About 3 month back, I tried to get the logistics pipes api working, to no avail. I've recently come back to modded minecraft to find this error: http://imgur.com/XK7CL4 . This is quite odd, as most of the other methods work just fine (or so it seems). Is there any way to fix this?

1 Upvotes

2 comments sorted by

1

u/martmists Dec 18 '15

Imgur link seems to be down. Try

>lua
lua> p = peripheral.wrap(side)
lua> peripheral.getMethods(side)
--returns list of methods
lua> p.<method>()

Peripheral:no such method implies a method does not exist, and thus wont be listed in the list of methods getMethods() returns. Also, try installing openperipheral, as that often adds peripherals.

1

u/SniperKitten Dec 18 '15

It's definitely in the methods, but I think I'm not passing the correct types for my arguments. Also it throws an "attempt to call null" error if I put something not in arguments, so I think it's probably me not pass the right types.