ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   itemlink comparising allways fails (https://www.esoui.com/forums/showthread.php?t=8714)

cOOLsp0T 08/17/19 09:25 AM

itemlink comparising allways fails
 
Hello Guys,

I acutally try to compare 2 itemlinks from the same item. First from the lootwindow via "GetLootItemLink()" and after that when it reaches the inventory over GetItemLink().

When I compare that both itemlinks in the chatlog they look identical and working well, but when I compare them via code did the check allways fail. Did I make something wrong or did the itemlinks differ when they get over different functions?

Lua Code:
  1. recentlootitemlink = GetLootItemLink(lootID)
  2. recentinventoryitemlink = GetItemLink(bagID,slotID)
  3.  
  4. if recentlootitemlink ~= recentinventoryitemlink then d("wrong...") end
  5.  
  6. >>> wrong...


EDIT:
Found the problem. The post can be deleted. sorry, for the unconvience.

Dolgubon 08/17/19 11:10 AM

Personally, I prefer comparing specific parts of an item link. Item links from different sources, whether it's a default style or not, state of gear, etc. all change an item link, and you don't always care about it. So rather than a straight up equality, you should compare what you care about.

Scootworks 08/17/19 12:05 PM

i guess your problem is: one item link is with brackets, the other without

as far i remember, the itemLink from loot event starts with "|H0" and this one from inventory with "|H1"

ups, didn't read your edit :D


All times are GMT -6. The time now is 11:40 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI