Thread: !Beautycase
View Single Post
10-13-11, 03:16 AM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Most likely, SUF creates its frames dynamically, and has not created the player frame yet at the time your code is running. It will work when you type the same code in-game because the loading process has completed by then. To solve this issue, you would need to figure out when SUF creates its frames and run your code after that event has fired, or hook the function it runs to create its frames. I don't have time to download SUF and dig through its code at the moment, but if you can't figure it out, maybe someone else more familiar with that addon can help you.

The frame name doesn't appear in the addon's Lua files because it isn't hardcoded. When SUF creates a frame for the "player" unit, it also creates a name, using some predefined pattern like "SUF" + "unit" + <the unit>.
  Reply With Quote