Posted 06 February 2014 - 03:32 PM
I was look though forms and things what not to fix this code, I was programming a turtle, and I took the code from a pastebing, and some of the code does not work because of the new update with Peripherals. here is the code (this is only part of the program) here is the whole thing http://pastebin.com/zSu3xM53. But this section of the code doesn't work
The problem is within the 6th line "local slots = p.getAllStacks()" I know this because when the program run it returns books:17: attempt to call nil
So I found it was a problem because in the new Peripherals has a bug with that command, but over all can someone please help me fix this problem I tried many things and couldn't fix it, also I need everything to work as it is, but i need a different command for the 6th line, please help thanks.
[FIX]
I saw some other people who had this problem and what you need to do it go to this website http://www.openperipheral.info/ and download OpenPeripheralCore and OpenModLib, and put them in the mods folder in you mincraft root folder. What this allows you to do is have extra computercraft commands.
function checkSlots(id)
clearInv()
data = {}
local slot
local name
local slots = p.getAllStacks()
for i,j in pairs(slots) do
slot = i
name = j["destination"]
-- print(name)
data[slot]=name
end
rednet.send(id,"done")
end
The problem is within the 6th line "local slots = p.getAllStacks()" I know this because when the program run it returns books:17: attempt to call nil
So I found it was a problem because in the new Peripherals has a bug with that command, but over all can someone please help me fix this problem I tried many things and couldn't fix it, also I need everything to work as it is, but i need a different command for the 6th line, please help thanks.
[FIX]
I saw some other people who had this problem and what you need to do it go to this website http://www.openperipheral.info/ and download OpenPeripheralCore and OpenModLib, and put them in the mods folder in you mincraft root folder. What this allows you to do is have extra computercraft commands.
Edited on 06 February 2014 - 03:42 PM