View Single Post
02-25-18, 07:38 PM   #7
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Originally Posted by Panthergaming View Post
a custom frame called pvreadyDialog
There we go. What is this frame? Can you please post all the code related to this frame?

Edit: Nevermind, it's PVPReadyDialog (FrameXML\PVPHelper.xml:224). The part generating the error seems to be one of the two OnClick handlers for the enter/leave buttons:

XML Code:
  1. <Button name="$parentEnterBattleButton" inherits="UIPanelButtonTemplate" text="BATTLEFIELD_JOIN" parentKey="enterButton">
  2.     <Size x="115" y="22"/>
  3.     <Anchors>
  4.         <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" x="-7" y="25"/>
  5.     </Anchors>
  6.     <Scripts>
  7.         <OnClick>
  8.             if ( AcceptBattlefieldPort(self:GetParent().activeIndex, true) ) then
  9.                 if( StaticPopup_Visible( "DEATH" ) ) then
  10.                     StaticPopup_Hide( "DEATH" );
  11.                 end
  12.                 StaticPopupSpecial_Hide(self:GetParent());
  13.             end
  14.             PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
  15.         </OnClick>
  16.     </Scripts>
  17. </Button>
  18. <Button name="$parentLeaveQueueButton" inherits="UIPanelButtonTemplate" text="LEAVE_QUEUE" parentKey="leaveButton">
  19.     <Size x="115" y="22"/>
  20.     <Anchors>
  21.         <Anchor point="BOTTOMLEFT" relativePoint="BOTTOM" x="7" y="25"/>
  22.     </Anchors>
  23.     <Scripts>
  24.         <OnClick>
  25.             if ( AcceptBattlefieldPort(self:GetParent().activeIndex, false) ) then
  26.                 StaticPopupSpecial_Hide(self:GetParent());
  27.             end
  28.             PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB);
  29.         </OnClick>
  30.     </Scripts>
  31. </Button>

It seems that the activeIndex key of the frame may be nil when AcceptBattlefieldPort is called.

Last edited by Kanegasi : 02-25-18 at 07:48 PM.
  Reply With Quote