View Single Post
04/13/14, 10:08 AM   #11
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
you called
Lua Code:
  1. self:SetCustomPinEnabled( pinType, true )
but defined
Lua Code:
  1. function CustomMapPins:RefreshCustomPins(pinType)
  2.     ZO_WorldMap_RefreshCustomPinsOfType(_G[pinType])
  3. end

this should be
Lua Code:
  1. function CustomMapPins:RefreshCustomPins(pinType, bool)
  2.     ZO_WorldMap_RefreshCustomPinsOfType(_G[pinType], bool)
  3. end

which then results in an attempt to index nil value error in
Lua Code:
  1. local drawCallback = function(pinManager)
  2.            
  3.             -- Get the zone the player is in
  4.             -- this is how the gatherer addon gets it so hopefully it is correct
  5.             local pinZone = GetUnitZone("player") --GetMapName()
  6.            
  7.             -- Get the existing pin data for the current type and zone
  8.             -- And recreate the pins as we have just redrawn the map
  9.             local harvestData = XMPins.Data[pinType][pinZone]
  10.             for i,v in pairs(harvestData) do
  11.                 pinManager:CreatePin(_G[pinType], v.key, v.x, v.y, v.radius)
  12.             end
  13.         end
as XMPins.Data is still an empty table.
you probably want to iterate over SVData.
  Reply With Quote