View Single Post
11/12/14, 06:09 AM   #1
Flagrick
 
Flagrick's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 24
Pb with zo_strformat or itemlink and icon

Hello,

in lootdrop i have added a debug log to see exactly what we loot with more informations,
but I encounter a problem in that code :
Lua Code:
  1. -------------------------------------------------------------------------------
  2. function LootDrop:dbgDrop(iconFilename, c, quantity, text, tag)
  3.  
  4.     if (not self.db.DbgLog) then return end
  5.  
  6.     if ( not iconFilename or iconFilename == '' )then
  7.         iconFilename = [[/esoui/art/icons/icon_missing.dds]]
  8.     end
  9.  
  10.     if (quantity ~= 0) then
  11.         local color = ZO_ColorDef:New( c )
  12.         local dbgText1='[' .. GetTimeString() .. ']:'
  13.  
  14.         if not self.db.DbgLogTime then
  15.             dbgText1 = ''
  16.         end
  17.        
  18.         local icon = CreateIcon(iconFilename)
  19.  
  20.         local dbgText2=zo_strformat( '<<1[//$dx]>> <<2>>', quantity, text)
  21.         --d(dbgText2) --> label OK
  22.        
  23.         if ((tag=='INV') or (tag=='JUNK') or (tag=='MAIL')) then
  24.             dbgText2=zo_strformat( '<<1[//$dx]>> <<2>> |c736F6E(<<3>>)|r', quantity, text, self.ItemToPrint.nb)
  25.         end
  26.  
  27.         local dbgText3='.'
  28.         if tag~='' then dbgText3=' (' .. tag .. ').' end
  29.  
  30.         local finaldbgtext=zo_strformat( '<<1>> <<2>> <<3>><<4>>', dbgText1, icon, dbgText2, dbgText3)
  31.         d(finaldbgtext)
  32.     end
  33. end

d(dbgText2) gives me that :
but in final with finaldbgtext it prints that :
where could come the 'rh', any idea ?

item with tag INV, MAIL or JUNK are correctly print :

I have made a lot of tests but I have no idea to correct it.
I think I do a mistake with itemlink or zo_strformat but I don't know which one.
if someone could help ...
  Reply With Quote