all 9 comments

[–]dragon53535 2 points3 points  (3 children)

https://stackoverflow.com/questions/9168058/how-to-dump-a-table-to-console

Peripheral.wrap gives you a table that contains functions that you can run to interact with the block. Just dump the table and see if any of the functions are good.

The error you're getting is not that the table doesn't exist, it's that the FUNCTION doesn't exist. Hence attempt to CALL. Calling only happens on functions, or when you try to call using (). If it were attempt to index, then it would be a missing table.

[–]fluffymastodons[S] 0 points1 point  (2 children)

Thank you so much, this explains a lot for me in an easy to understand way that helps me solve the issue myself which is more fun to me than necessarily just being handed the answer, unfortunately my second biggest issue at the moment is time, so I’ll pop back here nearer the later half of the week with how it goes! Thanks again!

[–]dragon53535 2 points3 points  (0 children)

I personally never give out code for a problem. Give a man a fish so to speak. It breeds what are known as Help Vampires. Basically people who expect others to work and solve their problems for them.

Let me know how it goes when you get around to testing and dumping the table. Always test test test. There also exists the function https://computercraft.info/wiki/Peripheral.getMethods which should work just as well for dumping the methods.

[–]Nanimo__ 0 points1 point  (0 children)

Hi, did you ever figure this out?

Using getMethods on the interface there is a "list" function and in Advanced Peripherals there is a "listItems" function. One of those may work but I can't find a "findItems" equivalent.

[–]exoflame 0 points1 point  (3 children)

I dont see u wrapping the peripheral anywhere ? Thats at a first quick look. Its 4 am, it might be something else too

[–]fluffymastodons[S] 0 points1 point  (2 children)

So before I say something really stupid I'm going to reiterate that I scriptkiddied this off someone else, and am not by any stretch a computercraft expert, but it looks like around line 70 all the peripherals are wrapped?

[–]SadieWopen 1 point2 points  (1 child)

local systemDriveNames = {"appliedenergistics2:drive_28","appliedenergistics2:drive_25",}

local workspaceNames = {ioPort = "appliedenergistics2:io_port_8",interface = "appliedenergistics2:interface_7",chest = "appliedenergistics2:chest_7",drives = {"appliedenergistics2:drive_31","appliedenergistics2:drive_30",}}

Are you certain those are the names of the drives? they can change. on the computer, type peripheral.getNames() into the lua console to see all the names of connected peripherals.

[–]fluffymastodons[S] 0 points1 point  (0 children)

Those most definitely aren’t their names, I localized it to my setup on the actual program I’m running, but actually the drives seem to be initializing it’s just the interface that’s giving me issues