Created
February 7, 2021 21:46
-
-
Save MrJake222/30a3bc57a2a3657d8682bbd858e024c0 to your computer and use it in GitHub Desktop.
Simple counter program for AUNIS Beamers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local event = require("event") | |
local counts = {} | |
while true do | |
_, _, _, tab = event.pull("beamer_transfers") | |
for k,v in pairs(tab) do | |
if counts[k] == nil then counts[k] = 0 end | |
counts[k] = counts[k] + v | |
end | |
for k,v in pairs(counts) do | |
io.write(k..": "..v..", ") | |
end | |
io.write("\n") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment