View Single Post
02-25-24, 12:46 AM   #5
Hubb777
A Flamescale Wyrmkin
 
Hubb777's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2024
Posts: 113
Originally Posted by Fizzlemizz View Post
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.
Thank you very much. Perfect.
  Reply With Quote