04/26/15, 03:59 PM | #1 |
CustomCompassPins: What am I doing wrong?
I am trying to add color to my compass pins, to accomodate my recent changes to Destinations.
I would have thought I should do somthing like this (by adding additionalLayout): Lua Code:
Code:
user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:227: function expected instead of nil stack traceback: user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:227: in function 'CompassPinManager:ResetPin' user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:178: in function 'CompassPinManager:GetNewPin' user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:252: in function 'CompassPinManager:Update' user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:158: in function 'COMPASS_PINS:Update' user:/AddOns/SkyShards/Libs/CustomCompassPins/CustomCompassPins.lua:41: in function '(anonymous)' I am probably just overlooking something... |
|
04/26/15, 04:25 PM | #2 |
Lua Code:
COMPASS_PINS.pinLayouts should be for your current case COMPASS_PINS["PINS_QUESTS_DONE"] I think? The ResetPin(pin) function tries to call the layout callback function that you have defined beyond "pinLayout_QuestsDone.additionalLayout" at index [2]. But there does not seeem to be an index [2] in your definition. I think you need to define it like this then: Lua Code:
EDIT: I just saw that in the function CompassPinManager:Update() there is another call to the addiitonal layouts and there is used the index [1]: Lua Code:
So index [1] seems to be a function too, with the parameters pin, angle, normalizedAngle, normalizedDistance |
|
04/26/15, 05:17 PM | #3 | |
The odd thing is Garkin makes it work without reference to any index. This is a copy directly from "PublicDungeonChampions":
Lua Code:
Lua Code:
|
||
04/26/15, 05:52 PM | #4 | ||
Library description says:
Lua Code:
|
|||
04/27/15, 01:48 PM | #5 |
Thanks for the replies
I was sure I tried it, but I guess I made some mistake... This is the solution (using my first code example as template): Lua Code:
Case closed |
|
ESOUI » Developer Discussions » Lua/XML Help » CustomCompassPins: What am I doing wrong? |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|