Jump to content




OpenPeripherals - Railcraft Tanks API


  • You cannot reply to this topic
2 replies to this topic

#1 OczkoSX

  • Members
  • 29 posts

Posted 01 May 2014 - 09: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?

#2 OczkoSX

  • Members
  • 29 posts

Posted 01 May 2014 - 09: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 ;)

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 01 May 2014 - 10:31 AM

The notes re getting documentation out of OpenPeripheral are here; they might be useful to you in future.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users