Thread Tools Display Modes
03/13/14, 08:32 PM   #1
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Monitoring for errors

I'm getting tired of having a problem with the addon I'm working where I get an UI error states 'function expected instead of nil'. It doesn't give me any indication on where the error is. I know it typically means I missed some parameter to a function call that was expecting one, but between my last working version and the one with the error I only added function calls that do not take parameters.

Am I missing some way to get a better idea about what the error is about?
  Reply With Quote
03/13/14, 08:51 PM   #2
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
oh I was getting a few of those last beta weekend .. makes it even worse when you only have a few days to write and test addons rofl .. Whenever I got the message it was almost always the last piece of code I added which helped.

I would suggest maybe throwing up the error message you're getting and the block of code that it seems to refer to and go from there.
  Reply With Quote
03/13/14, 10:33 PM   #3
Pawkette
 
Pawkette's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 20
Console can help catch some errors that occur during startup and initialization. Things that the chat window normally wouldn't show.
  Reply With Quote
03/14/14, 03:43 AM   #4
Lyeos
 
Lyeos's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 6
Originally Posted by Pawkette View Post
Console can help catch some errors that occur during startup and initialization. Things that the chat window normally wouldn't show.
Didn't see this one!
I'll test it for sure
  Reply With Quote
03/14/14, 06:04 AM   #5
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Originally Posted by Pawkette View Post
Console can help catch some errors that occur during startup and initialization. Things that the chat window normally wouldn't show.
unfortunately, since the error occurs when addons load, Console cannot detect the problem before the game throws its own error.

But thank you.
  Reply With Quote
03/14/14, 06:39 AM   #6
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Yay! Figured it out. It is still odd and doesn't make much sense, but has to do with how your add-on is interpreted. For some reason, it would not let me do something early like assign GetFramerate() to a variable, but if I set that variable to 0, then changed it during a function call, it will work.
  Reply With Quote
03/14/14, 10:10 AM   #7
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
I had a few of them. Mostly when I have a local function that is defined after the first reference...
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Monitoring for errors


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