Quantcast WoWInterface - View Single Post - Securely setting a global variable
View Single Post
03-22-18, 05:30 PM   #1
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 482
Securely setting a global variable

I have the following code:

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


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

Code:
Message: Note: AddOn attempted to call a protected function (CancelUnitBuff()) during combat lockdown.
Debug:
   [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