Thread Tools Display Modes
07-18-12, 11:46 PM   #1
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
Changes for MoP

Hello,
I'm really bad at coding in LUA. I've been maintaing oUF_Nivea for myself and made my own changes on it for a while now, but now that I'm on the beta I'm not quite sure why any of my frames aren't loading. There is a very large heap of files I would have to go through to find what isn't working, and I would much rather make a brand new unit frame than try to sort through all of Dawn's coding.

So I guess my question is, are there a few common functions or API changes that I should be aware of that are layout breaking in MoP? I updated to the latest oUF from haste's github, but apart from that I am at a loss. I can get oUF_simple to work, so if all else fails I will begin modification on that.
  Reply With Quote
07-19-12, 05:42 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
5.0 API changes on Wowpedia:
http://www.wowpedia.org/Patch_5.0.1/API_changes

Initial changes found:
http://www.wowinterface.com/forums/s...ad.php?t=43091

5.0.1->5.0.3 changes:
http://www.wowinterface.com/forums/s...ad.php?t=43719

And a whole thread in this very forum about oUF changes:
http://www.wowinterface.com/forums/s...ad.php?t=43621

And an entire forum for threads about API changes:
http://www.wowinterface.com/forums/f...play.php?f=153

These resources are not even remotely difficult to find. If you need more specific help, you're going to have to post some code and any error messages, and ask more specific questions.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
07-19-12, 06:21 PM   #3
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
Thank you Phanx. The main problem I am having is that I get no error messages at all -- I simply log in and I have the default unit frames, which is why I have no idea at all where to start. I don't expect anyone to troubleshoot the entire addon for me and find what exactly is breaking, so if you know of any general problems that might cause the addon from not loading or only loading partially I'm open to any suggestions. Otherwise I'll dive into the resources you've provided (of which I've found before, but was extremely daunting).

The addon is a barely modified version of ouf_nivea:
http://www.wowinterface.com/download...oUF_Nivea.html
  Reply With Quote
07-19-12, 07:19 PM   #4
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
Here is the very long lua file...

https://gist.github.com/3148057

I updated the tags in another file, and searched to see if any of the "Changed API"s were in this file, but there weren't any of them. Any ideas? If I had an error message I'd be on a lot better footing right now.
  Reply With Quote
07-19-12, 07:47 PM   #5
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Enable Lua errors under Interface Options > Help and try again.
  Reply With Quote
07-19-12, 07:52 PM   #6
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
They've been enabled (I got LUA errors for one other addon)
  Reply With Quote
07-19-12, 08:04 PM   #7
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
I just downloaded an addon called "BugGrabber" that I'll use to see if there are lua errors that just aren't being displayed. Be back in about 5 min. due to the long loading screens on beta right now
  Reply With Quote
07-19-12, 08:53 PM   #8
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
All right.

Looks like they changed the GetSpellInfo function? Or maybe they changed it a while back and it's only layout breaking now?

Here's what Dawn wrote to whitelist which auras to display:

Lua Code:
  1. Whitelist = {
  2.     auras = {
  3.  
  4.     ---------  
  5.     -- PvE --
  6.     ---------
  7.        
  8.     -- Baradin Hold
  9.         --Argaloth
  10.         [GetSpellInfo(88954) or "Consuming Darkness"] = true,
  11.        
  12.     -- The Bastion of Twilight
  13.         -- Halfus Wyrmbreaker
  14.         [GetSpellInfo(83908) or "Malevolent Strikes"] = true,
  15.        
  16.         -- Valiona and Theralion
  17.         [GetSpellInfo(86844) or "Devouring Flames"] = true,
  18.         [GetSpellInfo(86788) or "Blackout"] = true,
  19.         [GetSpellInfo(95639) or "Engulfing Magic"] = true,
  20.         [GetSpellInfo(86013) or "Twilight Meteorite"] = true,
  21.  
  22. -- Lots of spells in between
  23.  
  24.         [GetSpellInfo(49039)] = true,                   -- Lichborne
  25.         [GetSpellInfo(73975)] = true,                   -- Necrotic Strike
  26.    
  27.     },
  28. }


The error I get is the following, from BugGrabber:
Code:
oUF_Nivea\Nivea_AuraFilterList.lua:47: table index is nil
oUF_Nivea\Nivea_AuraFilterList.lua:47: in main chunk
oUF_Nivea\Nivea:155: attempt to index global "Whitelist" (a nil value)
oUF_Nivea\Nivea:155: in main chunk

edit:: Nevermind... I deleted most of the spells from the aurafiltering (except one that wasn't throwing an error) and I got it to partially work. Lol I guess some spells just got deleted on the beta. Now I have a bunch of other errors but I should be able to work through it. Thanks!

Last edited by in10s3gamer : 07-19-12 at 09:02 PM.
  Reply With Quote
07-20-12, 12:15 AM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
GetSpellInfo works the same as it always has; if the provided spell ID does not map to any existing spell, it returns a nil value.

An easy way to avoid the problem:

Code:
local function GetSpellName(id)
    local name = GetSpellInfo(id)
    if not name then
        print("Invalid spell ID:", id)
    end
    return name or ""
end
Then replace all calls to GetSpellInfo with calls to your custom GetSpellName function.

This way, you won't have to update immediately when Blizzard removes a spell, and you won't have to do any work to figure out which spell(s) were removed, since it will tell you right in the chat frame which IDs are no longer valid.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
07-20-12, 06:42 PM   #10
in10s3gamer
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 8
Thank you so much!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Changes for MoP


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