Quantcast
How can I fix this argument in LUA - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-03-16, 11:27 AM   #1
Bmw309894
A Deviate Faerie Dragon
 
Bmw309894's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2012
Posts: 10
How can I fix this argument in LUA

I am using an old UI but with updated addons and I've only come across one issue and here it is.

Message: ...rface\AddOns\DoomKitty\modules\datatexts\friends.lua:27: bad argument #4 to 'format' (string expected, got nil)
Time: 07/03/16 13:07:17
Count: 10
Stack: [C]: in function `format'
...rface\AddOns\DoomKitty\modules\datatexts\friends.lua:27: in function <...rface\AddOns\DoomKitty\modules\datatexts\friends.lua:10>

Locals: (*temporary) = "%s | %s (%s)"
(*temporary) = "|Kf64|kIronWill|k"
(*temporary) = "IronWill#1602"
(*temporary) = nil
(*temporary) = "string expected, got nil"



Here is the set of strings it is referring to:

local function CreateTooltip()
tool:SetScript("OnEnter", function(this) -------------THIS IS NUMBER 10
GameTooltip:SetOwner(this)
GameTooltip:AddLine("Friends Online")

GameTooltip:AddLine(" ")

for k,v in pairs(friendList) do
local name, lvl, class, area, status, note = v[1], v[2], v[3], v[4], v[5], v[6]
local lineL = string.format("%s %s %s", lvl, name, status or "")
local lineR = string.format("%s", area or "")

GameTooltip:AddDoubleLine(lineL, lineR)
end
GameTooltip:AddLine(" ")

for k,v in pairs(BNetList) do
local BNid, BNname, battleTag, toonname, client, status, broadcast, note = v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8]
local lineL = string.format("|cffecd672%s|r |cffffffff|| |cffecd672%s|r |cffffffff(%s)|r", BNname, battleTag, toonname) ------THIS IS NUMBER 27
local lineR = string.format("|cffffffff%s%s|r", status or "", client or "")

GameTooltip:AddDoubleLine(lineL, lineR)
end

GameTooltip:Show()
end)
tool:SetScript("OnLeave", function(this) if (GameTooltip:IsShown()) then GameTooltip:Hide() end end)
tool:SetScript("OnMouseDown", function(this, button)
if (not InCombatLockdown()) then
ToggleFriendsFrame(1)
end
end)
end



I do not know how to edit the string properly so that it does not mess up when I mouse over it. Any chance for some help fixing this?
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » How can I fix this argument in LUA

Thread Tools
Display Modes

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