Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-15-24, 12:58 PM   #1
fatrog
A Fallenroot Satyr
Join Date: Nov 2022
Posts: 21
trying to call placeholderG a nil value

Hello, I have a problem with this bit

Lua Code:
  1. local function GetMacroIDInfos(tt)
  2.     spellID = nil
  3.    
  4.     displayedName = placeholderG[tt:GetName().."TextLeft"..1]:GetText()
  5.     placeholder,placeholder,placeholder,placeholder,placeholder,placeholder,spellID = GetSpellInfo(displayedName)
  6.    
  7.     if spellID ~= nil then
  8.         SetNewLineWithID(tt,spellID)
  9.     end
  10. end
  11.  
  12. TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Macro, GetMacroIDInfos)

Apparently the placeholderG object is not filled properly. For instance, I did that for spells

Lua Code:
  1. local function GetSpellIDInfos(tt)
  2.     spellID = nil
  3.    
  4.     placeholder, spellID = TooltipUtil.GetDisplayedSpell(tt)
  5.     if spellID ~= nil then
  6.         SetNewLineWithID(tt,spellID)
  7.     end
  8. end
  9.  
  10. TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Spell, GetSpellIDInfos)

and it work like a charm.

Any idea what is happening here?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » trying to call placeholderG a nil value


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