A good practice is to prefix your public function with the addon name. You will avoid few kinds of conflict. As example :
I also saw with a :, instead the dot.
And i think you missed a name on the second, and got a wrong controller.
PileOMobs:RegisterForEvent(EVENT_LOOT_RECEIVED, lootReceived)
|
Try to type it like the first, what will be like :
EVENT_MANAGER:RegisterForEvent("PileOMobs", EVENT_LOOT_RECEIVED, lootReceived)
|