Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-25-15, 01:11 PM   #1
kawe
A Cyclonian
 
kawe's Avatar
Join Date: Sep 2009
Posts: 40
bad argument

Code:
Message: Interface\AddOns\oUF_Mu\core\layout.lua:242: bad argument #2 to 
'SetFormattedText' (string expected, got boolean)
Time: 09/25/15 21:04:13
Count: 1
Stack: [C]: in function `SetFormattedText'
Interface\AddOns\oUF_Mu\core\layout.lua:242: in function
 <Interface\AddOns\oUF_Mu\core\layout.lua:241>
(tail call): ?
(tail call): ?
(tail call): ?
Interface\AddOns\oUF\elements\altpowerbar.lua:143: in function `func'
Interface\AddOns\oUF\events.lua:48: in function <Interface\AddOns\oUF\events.lua:46>
(tail call): ?

Locals: (*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = "%s: %i"
(*temporary) = false
(*temporary) = 25
(*temporary) = "string expected, got boolean"
can anyone please explain whats wrong with the formatting and how to fix it?

shouldve pasted the actual code from the core file


Code:
if cfg.altpowerbar then		-- alt power bar skinning
			local altpower = CreateFrame('StatusBar', nil, UIParent)
			altpower:SetStatusBarTexture(cfg.powertex)
			altpower:SetStatusBarTexture(0.6, 0.6, 0.6)
			altpower:SetSize(160, 4)
			altpower:SetPoint('TOP', 0, -136)
			
			local bg = altpower:CreateTexture(nil, 'BACKGROUND')
			bg:SetAllPoints(altpower)
			bg:SetTexture(0.1, 0.1, 0.1, 0.75)
			altpower.bg = bg
			
			local value = altpower:CreateFontString(nil, 'OVERLAY')
			value:SetFont(cfg.font, cfg.fontsize, cfg.fontflag)
			value:SetPoint('TOP', altpower, 'BOTTOM', 0, -4)
			altpower.value = value
			
			altpower.border = mu.createBorder(altpower)
			altpower.PostUpdate = function(Bar, min, cur, max)
			Bar.value:SetFormattedText('%s%s', Bar.powerName, cur)
			end
			
			self.AltPowerBar = altpower
		end

Last edited by kawe : 09-26-15 at 04:05 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » bad argument


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off