View Single Post
04/24/14, 10:52 PM   #9
archpoet
Cunning Linguist
 
archpoet's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 19
The first one should work:
Code:
EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_ADD_ON_LOADED, function (eventCode,addOnName)
    if addOnName == "HarvestMap" then
        Initialize()
        Harvest.OnLoad(eventCode, addOnName)
    end
end)
Basically you're only passing a reference to the RegisterForEvent() method, it doesn't *require* a name for the function.. and you definitely don't want to re-define Harvest.OnLoad() if you want it to call the other one inside the reference.

Looking good tho!

Last edited by archpoet : 04/24/14 at 10:52 PM. Reason: code blocks
  Reply With Quote