I guess I have been staring at this problem for too long as I can't see the problem. Hope some here can help
I am trying to add a custom pin for unknown wayshrines with a nearby guild trader using this code:
Lua Code:
-- insert custom pin for wayshrines
local data = GuildTraderDataStore[GetCurrentMapZoneIndex()]
if not data then return end
for _, pinData in ipairs(data) do
local WAYSHRINE = pinData[GuildTraderDataIndex.WAYSHRINE]
if WAYSHRINE == objectiveName then
table.insert(pinTag, 3, zo_strformat("|c666666<<t:1>>|r", GetString(POITYPE_GUILDTRADERS)))
LMP:SetLayoutKey(pinType, "texture", pinTextures.unknownrealpins[15])
LMP:CreatePin(pinType, pinTag, normalizedX, normalizedY)
break
else
LMP:SetLayoutKey(pinType, "texture", pinTextures.unknownrealpins[1])
LMP:CreatePin(pinType, pinTag, normalizedX, normalizedY)
break
end
end
using these data (example):
Lua Code:
----Deshaan
[11] = {
{"Muth Gnaar Hills Wayshrine"},
{"Tal'Deic Grounds Wayshrine"},
},
For some reason it only returns the FIRST wayshrine on my list. It's the same on all maps. Only the first is returned, as if "GuildTraderDataIndex.WAYSHRINE" only reads the first, BUT it reads it as many times as there are wayshrines on the list, so the Deshaan example are returned twice, hence the "Break" command which makes it return only once.
What am I doing wrong?