What steps will reproduce the problem?
1. Create a TEXT aura that is set to trigger on any easily-obtained self-castable buff (I am using Legacy of the Emperor)
2. Display %c for custom text
3. Input the following custom text
function()
local testything=WeakAuras.CurrentUnit
if testything ~= nil then return(testything) else return ("ths is nil") end
end
OR
function()
local testything=GetUnitName(WeakAuras.CurrentUnit
if testything ~= nil then return(testything) else return ("ths is nil") end
end
What is the expected output? What do you see instead?
First custom text: Expected player name or some other identifier that is able to be passed to GetUnitName(). Seeing "this is nil" instead.
Second custom text: see error log
What version of the product are you using?
1.4.7.9 via curse client
Do you have an error log of what happened?
Message: Interface\FrameXML\UnitFrame.lua:619 Usage: UnitName("unit")
Time: 04/24/13 18:37:02
Count: 562
Stack: [C]: ?
[C]: in function `UnitName'
Interface\FrameXML\UnitFrame.lua:619 in function `GetUnitName'
[string "return function()..."]:2: in function <[string "return function()..."]:1>
Interface\AddOns\WeakAuras\RegionTypes\text.lua:89 in function `UpdateCustomText'
Interface\AddOns\WeakAuras\WeakAuras.lua:4961 in function <Interface\AddOns\WeakAuras\WeakAuras.lua:4957
Please provide any additional information below.
Export for test aura:
dSJzcaGEHq7scTnrPzkuzUIOzdvZNsu3gOVjc9zOStjyVk7g0(LAuiL(ROQFtXJbCEu1GHmCvYbPKQtrjCmKQZjkoTQoSGfJKSCelsi1tPAzQONlPtkQmvuzYs00jDrHQUQi4ziHRtP2OqXLj2mk2UqWdPe5RuszAQW3PKyKusAyQuJgLgps0LekDlHORjsDpHKvIKACIKxJu8OpU5)8CqvimbajzoadSMmq1J)kFEqdKM84cwaG3WOSIaEjedzEDo9IhftSyM5GZlNxoU5mgO6FeLv48EE5xVWd8CcL68y)gflWCa7QAa5ek15m2qa9nqATOPUrnQrnc3aeWBKkvLxzFiwuwtc0yDBsOw0s2eIa1eGV2u3Og1Og9mnsLQYRSpeRrTLJQrWhVrkRaBeruBcKwvQkVY(qmlAKGxLgre1MaBeTrRSFTrFTrWhpAlAKalBQfy5CIG9gih)Lmxfk15k5XWeY4MxVeGN5bsa(6CRgiGgOeMddGsDCRa95Xjyba(gzyAKYknkEWlHyitNBdFDoOasLqMo3kFPYUyYM6(8il977uuqXDIPphtKhzNdTb5ipgMqQRa95SYJXQlM0zpZCKj9jfzopsN68ymrEKA(xoxLQoh3ekh3CIbxg3CqBC9h30PtNopmU5Xjyba(gzyAKYknkEWlHyiZZbvHWeaKK5amWAYavp(R85bnqAYJlybaEdJYkc4LqmKPZJWkq)4(E6ga
Happens regardless of what I enter in the "Unit" section of the triggers, but at this time it was Specific Unit with my own player name for testing.