Variable Initalization Issue
************
Solved - XML Control had the same name as the addon *********** I'm fairly new to Lua so perhaps I'm missing something obvious. My IF statement that is checking the addon name keeps failing -- after doing some digging I've found that my TimetoLevel.name is never being set. Is there a reason that these variables would fail set? Code:
TimetoLevel = {} Code:
if ( addOnName ~= "TimetoLevel" ) then Code:
## Title: TimetoLevel |
It's the folder name of your addon which matters.
|
Quote:
Documents\Elder Scrolls Online\live\AddOns\TimetoLevel |
Just a tip, but I figured I may as well mention that your description is data better placed elsewhere and you should describe what the addon does in the description.
Code:
;Having a comment here helps with formatting issues. |
Quote:
#Edit -- Recreating the folder didn't fix the issue. |
The name of the text file needs to match the folder name. However if your code can work when you hard code the name, it looks like it's already loading. In that case, here's what I would do. install pChat, and set it as an optional depends on in the text file. Then add d() all over. Check that timestolevel is actually created, check that the name is correct when you declare it and before you pass it to the event manager. Check that it's correct when the initialization function is run and right before/after you do the check of the name, and output all the add-on names passed to your initialization function. It sounds tediuoz but if you have no clue, it can help.
|
My guess is that your problem is in your xml file. You most likely named a control "TimetoLevel" and it overwrites your table.
|
Quote:
|
All times are GMT -6. The time now is 10:47 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI