LUA Error with PTR/Beta version #935


  • New
  • Defect
Closed
Assigned to shadowed103
  • _ForgeUser17336778 created this issue Jul 18, 2016

    What steps will reproduce the problem?
    1. Targeting any player character or self

    What is the expected output? What do you see instead?
    Shadowed Unit Frames throws a LUA error every time a player character is targeted.

    What version of the product are you using?
    v4.1-Legion-Beta1 (while on the 7.0.3 PTR)

    Do you have an error log of what happened?
    LUA Error thrown:
    ----------------------------------------------------------------------------

    ...aceShadowedUnitFrames\modules\indicators.lua:23: attempt to index global 'CLASS_BUTTONS' (a nil value)
    ...aceShadowedUnitFrames\modules\indicators.lua:23: in function `?'
    ShadowedUnitFrames\modules\units.lua:36: in function `FullUpdate'
    ShadowedUnitFrames\modules\units.lua:366: in function `CheckUnitStatus'
    ShadowedUnitFrames\modules\units.lua:222: in function <ShadowedUnitFrames\modules\units.lua:219>
    [C]: in function `Show'
    FrameXML\SecureStateDriver.lua:83: in function <FrameXML\SecureStateDriver.lua:73>
    FrameXML\SecureStateDriver.lua:137: in function <FrameXML\SecureStateDriver.lua:119>

    ----------------------------------------------------------------------------

    The 'CLASS_BUTTONS' global, from which the texture coordinates for the class-icons is drawn, doesn't seem to exist anymore. I couldn't find anything about changes to the API, so it might be necessary to get the class-icons some other way.

  • _ForgeUser17336778 added the tags New Defect Jul 18, 2016
  • _ForgeUser17336778 edited description Jul 18, 2016
  • _ForgeUser17336778 posted a comment Jul 18, 2016

    Ok, I had another look around and found that you can replace CLASS_BUTTONS with CLASS_ICON_TCOORDS and it works flawlessly.

    So change line 23 in modules\indicators.lua:

    local coords = CLASS_BUTTONS[class]

    to:

    local coords = CLASS_ICON_TCOORDS[class]

    and the issue is fixed. I got the info about the CLASS_ICON_TCOORDS global from http://wowprogramming.com/docs/api/UnitClass.


    Edited Jul 18, 2016
  • nevcairiel posted a comment Jul 19, 2016

    Fixed, thanks for reporting and the research :)


To post a comment, please login or register a new account.