View Single Post
12/15/22, 08:05 AM   #5
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by Baertram View Post
One hint to your code Masteroshi:

Could work but is a manual concatenation which should not be used if there are better ways provided by ZOs:
local tag = "group"..tostring(i)

You also would not (or at least should not) always just use 1, instead of the correct constant BAG_BAGPACK for the inventory's bagId.
-> The constants and API functions exist to make it compatible, also for future use cases. So better make use of them instead of re-inventing your own code that maybe works today, but breaks tomorrow.


Definately works (and is API and should be used here):
Code:
local unitTag = GetGroupUnitTagByIndex(i)
Ah yep Will change this in my code too, thanks
  Reply With Quote