View Single Post
03/26/20, 02:54 PM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
We are talking about this error, right?
Code:
user:/AddOns/MasterRecipeList/MasterRecipeList.lua:2430: operator .. is not supported for nil .. string
stack traceback:
user:/AddOns/MasterRecipeList/MasterRecipeList.lua:2430: in function 'NavigateScrollList'
|caaaaaa<Locals> list = 105, datalist = [table:1]{}, linktable = [table:2]{}, known = "|t16:16:/MasterRecipeList/bin/...", row = 2, i = 2, pos = 76, saved = 1, catstring = " (Alchemy)", linkname = "Bottle, Beaker", namestring = "Bottle, Beaker", preview = "" </Locals>|r
user:/AddOns/MasterRecipeList/MasterRecipeList.lua:4898: in function 'ESOMRL.XMLNavigation'
|caaaaaa<Locals> option = 304, n1 = 105 </Locals>|r
ESOMRL_MainFrameFurnitureFrameAlchemyButton5_Clicked:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud, button = 1, ctrl = F, alt = F, shift = F, command = F </Locals>|r
Not sure what makes you think this is related to library loading?
The line in question contains this code:
Lua Code:
  1. searchTable[row] = { pos = pos, text = known..pTC(color,namestring)..catstring..preview, name = linkname }
The message tells you that you cannot concat nil with a string.

The only things concatenated here are "known", the return value of "pTC", "catstring" and "preview". The three local variables show up in the variable list below the line in the stack trace, so they are definitely not nil, which leaves only the return value of pTC. From what I see pTC refers to the function TColor in LibPhinixFunctions and the code looks like this:
Lua Code:
  1. function lib.TColor(color, text) -- Wraps the color tags with the passed color around the given text.
  2.     -- color:       String, hex format color string, for example "ffffff".
  3.     -- text:        The text to format with the given color.
  4.  
  5.     -- Example: PF.TColor("ff0000", "This is red.")
  6.     -- Returns: "|cff0000This is red.|r"
  7.  
  8.     if color == nil then
  9.         if lib.ASV.enableDebug then
  10.             d("LibPhinixFunctions: No color passed to TColor function.")
  11.         end
  12.         return
  13.     end
  14.     if text == nil then
  15.         if lib.ASV.enableDebug then
  16.             d("LibPhinixFunctions: No text passed to TColor function.")
  17.         end
  18.         return
  19.     end
  20.  
  21.     local cText = "|c"..tostring(color)..tostring(text).."|r"
  22.     return cText
  23. end
There are two ways for it to return nil. Either when color is nil or when text is nil. Looking at the variable list again we can see that namestring is "Bottle, Beaker", but the color variable is missing, so there we have the answer to why the error shows up.
The remaining question is, why is color nil? from what I see in the code it should be the return value of GetItemLinkQuality converted to a color string via a lookup table. From the item name we can deduce that the link in question is |H1:item:118299:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h which should return a quality of 5 and result in a color string of "eeca2a", but for some reason that's not the case here.
  Reply With Quote