View Single Post
12-11-13, 04:46 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code:
self.frame = _G["stuf.units.party"..self.id]
"stuf.units.party3" is not a global name. "stuf" is the global name of a table, and "units" is a key in that table, and "party3" is a key in that table, and the value stored under that key is a reference to the unit frame you want. You can't look it up the way you wrote, though. Either:

(1) Type "/fstack" and move your cursor over a party frame to find out what its name is, and change your code accordingly. For example, if the name is "stufomglolcatsandlasersharkstrexparty3", then your script needs to look up _G["stufomglolcatsandlasersharkstrexparty"..self.id]

(2) Dispense with the _G lookup and change that to stuf.units["party"..self.id] instead.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote