Battlefield Minimap and WatchFrame Loading Problems ..
Scott, this error has been annoying the hell out of me but I finally figured out the cause .. here's the error I am getting :
Code:
[2010/04/19 21:19:37-2566-x1]: Interface\FrameXML\WatchFrame.lua:365: attempt to perform arithmetic on a nil value: However, if I alter the following code so that plugin.active is false in the BMM InfoPanel plugin the error doesn't occur. Although if I have it selected at the time it overloads the other frames until I toggle back through them. Code:
local CombatHit = {}; WatchFrame Addon Loaded BMM Paused WatchFrame Addon process continues... BMM Continued Life goes on as planned :D |
It would be dirty pool, but you could cheat the info panel indexing system something like this...
Code:
-- assume your panel mode is nUI_INFOMODE_WATCHFRAME = 20 You would have to do this *before* the VARIABLES_LOADED event fires. This *should* cause nUI to process the panels in an order that causes your panel to process before the BMM panel. If that doesn't work, then change the value of nUI_INFOPANEL_WATCHFRAME to be something that sorts before nUI_INFOPANEL_BMM and see if that doesn't fix it. Again, that would have to be before VARIABLES_LOADED fires. |
Yep that seemed to resolve the problem. Even future proofed it so that they will swap around so that the minimap is loaded after the watchframe regardless to what number you give it at a later date :D
Code:
local ipID = min(nUI_INFOMODE_BMM,23); |
Hmm, well that definitely solved the problem for the code being used at the moment but the new object orientated way I have been working on doesn't seem to trigger the error somehow. Will have to do further tests to make sure though but frames are either created during code loading or addonloading. In fact I just created 2 extra infopanels with 4 lines rofl. They're not functional much but it shows hope.
|
All times are GMT -6. The time now is 04:57 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI