1 posts
Posted 07 April 2014 - 08:17 PM
function checkSlots(id)
clearInv()
data = {}
local slot
for i=1,p.getInventorySize() do
slot = p.getStackInSlot(i)
if slot then data[i] = slot.destination end
end
rednet.send(id,"done")
end
For me, I get this error: books:16: attempt to call nil
What's going on here? I'm running Unleashed 1.1.7
1281 posts
Posted 07 April 2014 - 08:40 PM
wat… Post the full code, and where did you quote this from?
8543 posts
Posted 07 April 2014 - 08:41 PM
I split this from a topic that was last active in February. It was vaguely related, but not helpful.
571 posts
Location
Some Fish Bowl in Ohio.
Posted 07 April 2014 - 10:22 PM
There aren't even 16 lines… ;-;
7083 posts
Location
Tasmania (AU)
Posted 07 April 2014 - 11:35 PM
Thankfully, quotes generally have links back to the
original post in context.
The issue turned out to be that people were attempting to use a script Direwolf wrote (which puts a list of Mystcraft book names up on a touch display so you can press them to generate portals) with an older version of OpenPeripheral. Which, due to OpenPeripheral's "special" documentation system… well, there were a few threads springing up about the matter at the time.
That function I wrote was a work-around (written from the perspective of someone who doesn't watch MineCraft YouTube videos nor wanted to install various versions of OpenPeripheral until he found the "right one"), though it'll likely need "slot.destination" replaced with "slot.name" to work (as mentioned in my complete original post).
1610 posts
Posted 07 April 2014 - 11:51 PM
Sometimes I really wish that Direwolf20 didn't release so many programs that don't have proper error checking and prevention. Would really help cut down on AAP requests.