Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sensor = peripheral.wrap("top")
- local players = sensor.getPlayers()
- for k, v in pairs(players) --# start a generic loop
- print(k .. " / " .. v) --# print each key/value pair in the table
- if type(v) == "table" then --# if the value is another table, then iterate though that table
- for i, n in pairs(v) do --# start another generic loop
- print(i .. " / " .. n) --# print each key/value pair in the table
- end
- end
- end
Add Comment
Please, Sign In to add comment