28 posts
Posted 01 May 2014 - 10:25 AM
Hi! How can i check all methods for rc's tanks ? I did p = peipheral.wrap("bottom"), p.listMethods(), but it just print listMethods(), getAdvancedMethodsData() and TankInfo(direction). When i use these methods it prints: table: <some signs here>
Can you help me?
28 posts
Posted 01 May 2014 - 10:33 AM
Ah my bad. I just had to do something like this:
local valve = peripheral.wrap("right")
local tableInfo = valve.getTanks("unknown")
for k, v in pairs(tableInfo) do
for x, y in pairs(v) do
print(x .. ": " .. y)
end
(code copied from other thread). I'm new on tables ;)/>
7083 posts
Location
Tasmania (AU)
Posted 01 May 2014 - 11:31 AM
The notes re getting documentation out of OpenPeripheral are
here; they might be useful to you in future.