View Single Post
02-25-24, 12:40 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
What they are saying is you need to change
Code:
f = CreateFrame("Button", "ZAMTimer777", UIParent, "BackdropTemplate")
to be
Code:
local f = CreateFrame("Button", "ZAMTimer777", UIParent, "BackdropTemplate")
Without the local in front, f will created as a global variable. Global variables are visible/changeable across all addons

ie. both addons will end up using the f frame that was assigned by the last addon (second) loaded.

That and the OnDragStop code is broken so you might want to remove everything but the line:
Code:
this:StopMovingOrSizing()
and maybe add f:SetUserPlaced(true) if you want the frame position remembered.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote