View Single Post
01/09/19, 08:09 AM   #8
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
The LUA error is caused because your ZGESO.pinLayoutData is a table inside a table.
You want to use one of the following two:
Code:
ZGESO.pinLayoutData = { level = 50, texture = "/Arrows/Stealth/arrow-error.dds", size = 40 }
OR
Code:
ZO_WorldMap_AddCustomPin(ZGESO.pinType, ZGESO.pinTypeAddCallback, ZGESO.pinTypeOnResizeCallback, ZGESO.pinLayoutData[0], ZGESO.pinTooltipCreator)
Also please note the following:
The ZGESO.pinTypeOnResizeCallback is called every time that scaling of the map changes. For example if you scroll your mouse wheel on the map, then this function will be called every single frame until the zoom animation finishes.
Your pinTypeOnResizeCallback calls ZO_WorldMap_RefreshCustomPinsOfType. The function ZO_WorldMap_RefreshCustomPinsOfType will remove all your pins and then call ZGESO.pinTypeAddCallback to re-create your pins.
Re-creating all your pins every single frame will cause tons of performance issues for you.
Also this is probably also the reason why line 45 is executed so often.
  Reply With Quote