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

openccsensor and chest slot question

Started by darkmists, 21 December 2013 - 11:32 AM
darkmists #1
Posted 21 December 2013 - 12:32 PM
How do i grab info from a table that is in a table?

example:

local test = {}
test[1] = {"lol", "me","worked"}
test[2] = {"test","it","no"}

i want to grab "it" from test[2]


Any help would be appreciated.
Lyqyd #2
Posted 21 December 2013 - 02:19 PM
test[2][2].

What you're actually looking for is more like:


local details = sens.getTargetDetails(chest)
print(details.Slots[1].Size)