Advertisement
Dojnaz

peripheralDebug.lua

Feb 7th, 2023 (edited)
794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. print("Enter side/id of peripheral to debug: ")
  2. local peripheral = peripheral.wrap(read())
  3.  
  4. local function printTable(t, indent)
  5.     for k, v in pairs(t) do
  6.         print(indent .. k .. ": ", v)
  7.         if type(v) == "table" then
  8.             printTable(v, indent .. "- ")
  9.         end
  10.     end
  11. end
  12.  
  13. printTable(peripheral, "- ")
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement