So, i am trying to set up a weakaura group of buttons that i can click to (re)apply buffs to teammates. For the time being, i am just trying to get variables from triggers to work, since i haven't been able to do that. I have been trying to follow the guide from https://github-wiki-see.page/m/WeakAuras/WeakAuras2/wiki/Text-Replacements#info-from-specific-triggers
So, for example, i want to say my own character's name in chat, like this (assuming the trigger is correct):
`local playerName = aura_env.states[1].name
if not aura_env.TEST then
aura_env.TEST = CreateFrame("Button", nil, aura_env.region, "SecureActionButtonTemplate")
aura_env.TEST:SetAllPoints()
aura_env.TEST:RegisterForClicks("LeftButtonUp")
aura_env.TEST:SetAttribute("type1", "macro")
aura_env.TEST:SetAttribute("macrotext1", '/say " .. playerName)
end`
This gives errors, and i'm not sure what the problem is.