Thank you for your reply. I changed the code as follows:
Lua Code:
for j = 1, GetNumGuilds() do
local guildId = GetGuildId(j)
local gotTrader = DoesGuildHavePrivilege(guildId, GUILD_PRIVILEGE_TRADING_HOUSE) or false
local isPlayerAllowedToSell = DoesPlayerHaveGuildPermission(guildId, GUILD_PERMISSION_STORE_SELL)
if gotTrader and isPlayerAllowedToSell then
if (SelectTradingHouseGuildId(guildId)) then
local currentListingCount, maxListingCount = GetTradingHouseListingCounts()
if(currentListingCount > 0) then
for i = 1, currentListingCount do
local _,itemName,displayQuality,stackCount,_,timeRemaining,salePrice = GetTradingHouseListingItemInfo(i)
local link = GetTradingHouseListingItemLink(i)
local linkItemId = GetItemLinkItemId(link)
table.insert(mytable,string.format("%s;%s;%s;%s;%s",guildId,linkItemId,itemName,salePrice,timeRemaining))
end
end
end
end
end
Unfortunately, I am still getting the double amount of items, i.e. the items that are actually sold in the Trading Guild, plus the same number of items for the 'regular' guild (that has no trader)
Did I understand your answer correctly?
thanks again,
cabwav