We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code for the Broadcast Handler should set Balance to 0 if it doesn't already exist.
Handlers.add( "Broadcast", Handlers.utils.hasMatchingTag("Action", "Broadcast"), function(m) -- Add line below to set Balance to 0 if it doesn't exist. if not Balances then Balances = { [ao.id] = 0 } end if Balances[m.From] == nil or tonumber(Balances[m.From]) < 1 then print("UNAUTH REQ: " .. m.From) return end local type = m.Type or "Normal" print("Broadcasting message from " .. m.From .. ". Content: " .. m.Data) for i = 1, #Members, 1 do ao.send({ Target = Members[i], Action = "Broadcasted", Broadcaster = m.From, Data = m.Data }) end end )
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Example code for the Broadcast Handler should set Balance to 0 if it doesn't already exist.
The text was updated successfully, but these errors were encountered: