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

[java] [peripheral] Can't Get Callmethod To Return Anything

Started by cyberunner, 16 October 2013 - 06:14 PM
cyberunner #1
Posted 16 October 2013 - 08:14 PM
Title: Can't get callMethod to return anything

Hi everyone, I am making a peripheral to get the id, the name and the dammage value of an item. I am making this peripheral to make a turtle able to track what item a person has made for a "Ultimate crafters challenge map" where the person has to make every single obainable item in the game. Anyways, I made the peripheral but each time i call a method it returns nothing… Heres a link to the source code: https://mega.co.nz/#...CWxjqAwLe-OUJ8w (Ohh, and yes this is my first mod/peripheral)

Hopefully someone could help,
Cyber

**EDIT**: Nevermind I found my mistake, I forgot to grab the ITurtleAccess while initializing the Peripheral. I ended up using an uninitialized instance of ITurtleAccess in my code OOPS. (If you want the source code with the corrections, just send me a PM and i will edit it in the post.)

(*Note to moderator*): I dont mind if you delete this instead of putting it in the Ask a pro thread but i find that it would be useful for people with the same mistake.
Edited on 16 October 2013 - 06:39 PM
Bubba #2
Posted 16 October 2013 - 08:39 PM
Yeah I'll leave this up here - could be useful. Will add a few notes to the title to further help people find it.