SHOW:
|
|
- or go back to the newest paste.
1 | c1 = "container_chest_0" | |
2 | c2 = "iron_1" | |
3 | c3 = "container_chest_2" | |
4 | c4 = "container_chest_3" | |
5 | c5 = "container_chest_4" | |
6 | ||
7 | inv1 = peripheral.wrap(c1) | |
8 | inv2 = peripheral.wrap(c2) | |
9 | inv3 = peripheral.wrap(c3) | |
10 | inv4 = peripheral.wrap(c4) | |
11 | inv5 = peripheral.wrap(c5) | |
12 | ||
13 | - | size1 = inv1.getSizeInventory() |
13 | + | size1 = inv1.getInventorySize() |
14 | - | size2 = inv2.getSizeInventory() |
14 | + | size2 = inv2.getInventorySize() |
15 | - | size3 = inv3.getSizeInventory() |
15 | + | size3 = inv3.getInventorySize() |
16 | - | size4 = inv4.getSizeInventory() |
16 | + | size4 = inv4.getInventorySize() |
17 | - | size5 = inv5.getSizeInventory() |
17 | + | size5 = inv5.getInventorySize() |
18 | ||
19 | - | net = peripheral.wrap("back") |
19 | + | --net = peripheral.wrap("back") |
20 | ||
21 | - | help = net.callRemote("container_chest_0","listMethods") |
21 | + | --help = net.callRemote("container_chest_0","listMethods") |
22 | ||
23 | - | print(help) |
23 | + | --print(help) |
24 | ||
25 | - | print(size1) |
25 | + | --print(size1) |
26 | - | --for i = 1, size1, 1 do |
26 | + | for i = 1, size3, 1 do |
27 | - | -- local tbl1 = chest.getStackInSlot(i) |
27 | + | local tbl3 = inv3.getStackInSlot(i) |
28 | - | -- for key, value in pairs(tbl1) do |
28 | + | if tbl3 ~= nil then |
29 | - | -- print(key .. " = " .. tostring(value)) |
29 | + | for key, value in pairs(tbl3) do |
30 | - | -- end |
30 | + | print(key .. " = " .. tostring(value)) |
31 | - | --end |
31 | + | end |
32 | end | |
33 | end |