Securely setting a global variable - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-22-18, 05:30 PM   #1
A Firelord
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 487
Securely setting a global variable

I have the following code:

Lua Code:
  1. function PLAYER_LOGIN()
  3.     BUFFS_PER_ROW=12
  4.     BUFF_MAX_DISPLAY=36
  5.     BUFF_HORIZ_SPACING=-1.25
  7. end

This works great, however I get the following silly error when I try to rightclick buffs in combat:

Message: Note: AddOn attempted to call a protected function (CancelUnitBuff()) during combat lockdown.
   [C]: CancelUnitBuff()
   ..\FrameXML\BuffFrame.lua:280: BuffButton_OnClick()
   [string "*:OnClick"]:1:
      [string "*:OnClick"]:1

I'm not altering these in combat. The values do not change beyond login. Is there a secure way to change these three variables?

I am not interested in any buff addons. I just want to change these three global variables once each session.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Securely setting a global variable

Thread Tools
Display Modes

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