1. #1

    Need help on addon fix

    I have been trying to fix this addon for MOP beta/when it goes live as it is a really good addon. The addon is really important to me and I would appreciate if you can help. The author has been missing for 1year ish. The addon is called EventAlert. Any addon authors know how to go about this? I'm getting this error:


    Message: Interface\AddOns\EventAlert\frames\options.lua:441: attempt to concatenate local 'EA_name' (a nil value)
    Time: 07/01/12 20:12:04
    Count: 1
    Stack: Interface\AddOns\EventAlert\frames\options.lua:441: in function `EventAlert_CreateAlertsOptionsFrames'
    Interface\AddOns\EventAlert\lua\main.lua:519: in function `EventAlert_CreateOptionsPanels'
    Interface\AddOns\EventAlert\lua\main.lua:23: in function <Interface\AddOns\EventAlert\lua\main.lua:16>

    Locals: frame = EAParentScroll {
    0 = <userdata>
    background = <unnamed> {
    }
    scrollframe = <unnamed> {
    }
    scrollbar = <unnamed> {
    }
    }
    texture = <unnamed> {
    0 = <userdata>
    }
    texture = <unnamed> {
    0 = <userdata>
    }
    scrollbg = <unnamed> {
    0 = <userdata>
    }
    content = EAScrollContentFrame {
    0 = <userdata>
    texture = <unnamed> {
    }
    }
    texture = <unnamed> {
    0 = <userdata>
    }
    buttonPositionX = 10
    buttonPositionY = -45
    tempTextCounter = 1
    (for generator) = <function> defined @Interface\AddOns\EventAlert\lua\main.lua:471
    (for state) = nil
    (for control) = 12964
    index = 12964
    value = "true"
    EA_name = nil
    EA_rank = nil
    EA_AlertOptions_CheckButton = EA_Button_12964 {
    0 = <userdata>
    }
    (*temporary) = <function> defined =[C]:-1
    (*temporary) = EA_Button_12964Text {
    0 = <userdata>
    }
    (*temporary) = nil
    (*temporary) = " [12964]"
    (*temporary) = "12964"
    (*temporary) = "]"
    (*temporary) = nil
    (*temporary) = <userdata>
    (*temporary) = "attempt to concatenate local 'EA_name' (a nil value)"


    Thanks in advance.

  2. #2
    The variable EA_name is the spell name retrieved using a spell ID. Check all the spell ID keys in the table for each class in the table called EA_Items that is iterated over on line 385 in frames/options.lua. Or it could be one of the overrides on lines 398-418 in frames/options.lua.

    You could debug a bit by adding these lines after line 396 in frames/options.lua:
    Code:
    if ( EA_name == nil ) then
    	print("Invalid spell ID:", index);
    	EA_name = "INVALID_SPELL_ID_" .. index;
    	EA_rank = "INVALID_SPELL_ID_" .. index;
    end

  3. #3
    Deleted
    Woogs already pointed out the errors in frames/options.lua. Many of the preset spell ids are invalid. You could either correct them or just put this below every line in frames/options.lua that throws a similar error (around 400, 486, 551, 677, 734).

    Code:
    if (EA_name == nil) then DEFAULT_CHAT_FRAME:AddMessage("spell id "..index.." invalid!"); EA_name = "unknown"; end

    Additionally, lua/main.lua is broken when it comes to parsing COMBAT_LOG_EVENT_UNFILTERED. I only worked with the combat log events once so I don't have very much experience but this is what COMBAT_LOG_EVENT_UNFILTERED returns on MoP beta right now.

    1 ?, ?
    2 event, string
    3 ?, bool
    4 guid, string
    5 player, string
    6 ?, int[4]?
    7 ?, int[1]?
    8 guid, string
    9 player, string
    10 ?, int[4]?
    11 ?, int[1]?
    12 spellid, int
    13 spellname, string
    14 ?, int?
    [...]
    These are the modifications I made, starting at line 101:
    Code:
    local EA_eventType = select(2, ...);
    
    -- player name
    --local EA_arg7 = select(7, ...); 
    local EA_arg7 = select(5, ...); 
    
     -- spell id
    --local EA_arg9 = select(9, ...);
    local EA_arg9 = select(12, ...);
    
     -- spell name
     --local EA_arg10 = select(10, ...);
     local EA_arg10 = select(13, ...);
    
     local EA_arg13 = select(13, ...);

    I wanted to avoid changing anything below so I didn't rename the variables or changed anything else. It's horrible, I know.

    Something else that needs to be done is adding support for new resource "bars" (shadow orbs for example). Start at lua/main.lua:68 for that (I think).
    Last edited by mmoca92f6e820c; 2012-07-01 at 01:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •