bad argument
Code:
Message: Interface\AddOns\oUF_Mu\core\layout.lua:242: bad argument #2 to shouldve pasted the actual code from the core file Code:
if cfg.altpowerbar then -- alt power bar skinning |
The second parameter being passed to SetFormattedText at line 242 in the file Interface\AddOns\oUF_Mu\core\layout.lua is a boolean (true/false) insted of text.
|
yes, but how is it that this worked before? (5.x & prev)
and how should i format it then? %s%s? %d %i? it only shows the current alt.power value fixed, seems that %s%s did the trick for correct display, thx for reply |
Just wanted to quickly point out that the text might look a little better with a space or two between the values and some brackets:
Code:
Bar.value:SetFormattedText('%s (%s)', Bar.powerName, cur) Code:
if (type(cur) == 'string') then |
alright, that is indeed better. :)
my thanks |
Quote:
|
Assuming the error is ocurring in this code:
Code:
altpower.PostUpdate = function(Bar, min, cur, max) The underlying problem is that the return values from UnitAlternatePowerInfo have apparently changed since that part of oUF was last updated. According to Blizzard code, the current return values are: Code:
barType, minPower, startInset, endInset, smooth, hideFromOthers, showOnRaid, opaqueSpark, opaqueFlash, anchorTop, powerName, powerTooltip, costString, barID = UnitAlternatePowerInfo(unit) Code:
local barType, min, _, _, _, _, _, _, _, _, powerName, powerTooltip = UnitAlternatePowerInfo(unit) |
well thx for the explanation, my solution was that the error disappeared en the bar skinning worked again :P
before i go into depths with lua and/or oUF i should put more effort into programming and learning lua, which, to this day has not happend :D :rolleyes: so i am mostly editing and trying to "fix" issues with some addons through my basic knowledge and of course wow interface forums ;) but oUF_Mu hasn't been updated since 5.4 and some important elements are not working properly. thx anyway for reply's, learned a little bit more :) |
Quote:
Remember that you're working with a UI addon for a video game, not the nuclear football. It's okay to make mistakes, and you'll (probably) learn more by trying something and screwing up than you will be having someone else tell you what to do. Of course there's nothing wrong with asking questions, but don't be afraid to experiment either. |
All times are GMT -6. The time now is 02:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI