Thread Tools Display Modes
07/12/14, 04:39 PM   #1
deniz_irgin
Join Date: Jul 2014
Posts: 6
AddOn Help, EVENT_ADD_ON_LOADED not fired

Hi,

Im trying to work this sample. I made some changes for more Object Oriented approach. But EVENT_ADD_ON_LOADED not firing for me.

Code perfecly run in ZeroBaneStudio IDE, but i think i do something wrong and my addon not working

Here is the github link:

https://github.com/Blind-Striker/EsoResourceHelper

Thank you,
  Reply With Quote
07/12/14, 05:05 PM   #2
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Giving it a test whirl...

But, just in case this is the case for you as well, the folder name for the addon is the same name as the txt file inside right ?

edit:
Are you assuming because the message doesn't appear that you have in AddOnLoaded function it can't be fired ?
If so, that is where you are mistaken. You can't display text on the screen at that point.
Add the following line at the end of your addonloaded function.

EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ACTIVATED, self.OnPlayerActivated)
And then do your initialisation after the addon is loaded and the player is on the screen. I am not sure if there is an event between ADD_ON_LOADED and PLAYER_ACTIVATED but I most of my debugging from OnPlayerActivated onwards because of this limitation. And with that event being set up inside addonloaded function you know it is being triggered.

function self.OnPlayerActivated(event)
self.DebugMessageHelper("Player Activated")
end

Last edited by Xrystal : 07/12/14 at 05:13 PM.
  Reply With Quote
07/12/14, 06:26 PM   #3
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
As Xrystal pointed out, normally the chat cannot recieve messages (not even d ones) until after the on loaded. Simply because the chat is not "there" yet and there is no buffering.
However, if you have bugeater isntalled, it put on your Optional Dependency list (so it loads before this addon) and Pre-Init Debug is enabeled in Bug Eater - then you can get d messages that get send so early out.
I would highly advise to use it for addon development. Pre-init debug helps a ton at finding issues.

Last edited by zgrssd : 07/12/14 at 06:28 PM.
  Reply With Quote
07/12/14, 06:56 PM   #4
deniz_irgin
Join Date: Jul 2014
Posts: 6
Originally Posted by Xrystal View Post
Giving it a test whirl...

But, just in case this is the case for you as well, the folder name for the addon is the same name as the txt file inside right ?
No you are right. When i change folder name as txt as file name all start working.

Thank you
  Reply With Quote
07/12/14, 06:58 PM   #5
deniz_irgin
Join Date: Jul 2014
Posts: 6
Originally Posted by zgrssd View Post
As Xrystal pointed out, normally the chat cannot recieve messages (not even d ones) until after the on loaded. Simply because the chat is not "there" yet and there is no buffering.
However, if you have bugeater isntalled, it put on your Optional Dependency list (so it loads before this addon) and Pre-Init Debug is enabeled in Bug Eater - then you can get d messages that get send so early out.
I would highly advise to use it for addon development. Pre-init debug helps a ton at finding issues.
Than you for your advice, its good know there is some way to diagnose addon.

Last edited by deniz_irgin : 07/14/14 at 01:41 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » AddOn Help, EVENT_ADD_ON_LOADED not fired


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off