This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So a little about what I did.
I went to https://addon.bool.no/ and put 2 lines in that I wanted to test out.
RegisterAttributeDriver(PlayerFrame, "state-visibility", "[combat][@target,exists]show;hide")
RegisterAttributeDriver(ObjectiveTrackerFrame, "state-visibility", "[group:party][raid]hide;show")
As you can see, the first line hides the player frame if no target or out of combat. The 2nd line hides the objective tracker if in a group or raid.
So far so good. It works fine on my hunter. *edit* also tested fine on my priest.
I logged over to my druid and I'm immediately presented with this error:
Message: Interface/FrameXML/ComboFramePlayer.lua:17: Usage: local power = UnitPower(unitToken [, powerType, unmodified])
Time: Mon Jan 30 17:01:46 2023
Count: 1
Stack: Interface/FrameXML/ComboFramePlayer.lua:17: Usage: local power = UnitPower(unitToken [, powerType, unmodified])
[string "=(tail call)"]: ?
[string "@Interface/AddOns/WagoAnalytics/WagoAnalytics.lua"]:72: in function <Interface/AddOns/WagoAnalytics/WagoAnalytics.lua:70>
[string "=[C]"]: ?
[string "=[C]"]: in function `UnitPower'
[string "@Interface/FrameXML/ComboFramePlayer.lua"]:17: in function `UpdatePower'
[string "@Interface/FrameXML/ClassPowerBar.lua"]:58: in function `OnEvent'
[string "@Interface/FrameXML/ClassResourceBarTemplate.lua"]:58: in function <Interface/FrameXML/ClassResourceBarTemplate.lua:38>
Locals: (*temporary) = <function> defined =[C]:-1
I thought ok, its mentioning "wago analytics" so I disabled that addon and still get this:
Message: Interface/FrameXML/ComboFramePlayer.lua:17: Usage: local power = UnitPower(unitToken [, powerType, unmodified])
Time: Mon Jan 30 17:03:08 2023
Count: 1
Stack: Interface/FrameXML/ComboFramePlayer.lua:17: Usage: local power = UnitPower(unitToken [, powerType, unmodified])
[string "=(tail call)"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `UnitPower'
[string "@Interface/FrameXML/ComboFramePlayer.lua"]:17: in function `UpdatePower'
[string "@Interface/FrameXML/ClassPowerBar.lua"]:58: in function `OnEvent'
[string "@Interface/FrameXML/ClassResourceBarTemplate.lua"]:58: in function <Interface/FrameXML/ClassResourceBarTemplate.lua:38>
Locals: (*temporary) = <function> defined =[C]:-1
So I am at a loss. Any LUA gurus out there that can tell me whats going on or how to fix that?
*EDIT*
I seem to have fixed it by making it wait until player entered the world.
local EventFrame = CreateFrame("frame", "EventFrame")
EventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
EventFrame:SetScript("OnEvent", function(self, event, ...)
if(event == "PLAYER_ENTERING_WORLD") then
RegisterAttributeDriver(PlayerFrame, "state-visibility", "[combat][@target,exists]show;hide")
RegisterAttributeDriver(ObjectiveTrackerFrame, "state-visibility", "[group:party][raid]hide;show")
end
end)
Is this the best way to do this? Just looking for input from coding perspective. Trying to teach myself LUA coding on the fly here.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/WowUI/comme...