Thread Tools Display Modes
09-07-19, 07:40 PM   #1
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
lua help

Can anyone help me please?

I have following code
Lua Code:
  1. zzz = CreateFrame("Frame", nil, nil)
  2. zzz:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. zzz:SetScript("OnEvent", function(self, event)
  4. ComboPointPlayerFrame:ClearAllPoints()
  5. ComboPointPlayerFrame:SetParent(MyNewFrame)
  6. ComboPointPlayerFrame:SetPoint('BOTTOM', MyNewFrame, 0, 9)
  7. ComboPointPlayerFrame:SetScale(1.43)
  8. end)

It makes the Combo points frame anchoring to my custom frame.

SetParent is for showing it up, because PlayerFrame is disabled via other addon.

Sooo, and it gives me always an error about family anchoring bla bla bla since 8.2 patch...
i know blizzard did something to the frames since 8.2

But the thing is: the code is working but this error... is there any way to get rid of it?
  Reply With Quote
09-09-19, 02:04 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
A more precise Lua error message would be nice aswell as the full addon code.
Second: wrong forum.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
09-09-19, 05:06 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
As per Zork, what is the error text ( all of it ) that shows. Any of the addons anchoring could be at fault so if there are other blocks of code that include anchoring you will definitely need to show them.
__________________
  Reply With Quote
09-09-19, 07:54 AM   #4
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
Code:
Message: Interface\FrameXML\ComboFramePlayer.lua:48: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: ComboPointPlayerFrame:SetPoint.
Time: Mon Sep  9 15:52:01 2019
Count: 1
Stack: Interface\FrameXML\ComboFramePlayer.lua:48: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: ComboPointPlayerFrame:SetPoint.
[C]: in function `SetPoint'
Interface\FrameXML\ComboFramePlayer.lua:48: in function `Setup'
Interface\FrameXML\PlayerFrame.lua:752: in function `PlayerFrame_HideVehicleTexture'
Interface\FrameXML\PlayerFrame.lua:424: in function `PlayerFrame_ToPlayerArt'
Interface\FrameXML\PlayerFrame.lua:201: in function `OnEvent'
Interface\FrameXML\UnitFrame.lua:933: in function <Interface\FrameXML\UnitFrame.lua:931>

Locals: (*temporary) = ComboPointPlayerFrame {
 0 = <userdata>
 OnLeave = <function> defined @Interface\FrameXML\ClassPowerBar.lua:72
 Combo3 = <unnamed> {
 }
 ComboPoints = <table> {
 }
 Combo4 = <unnamed> {
 }
 UsesPowerToken = <function> defined @Interface\FrameXML\ClassPowerBar.lua:38
 Setup = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:30
 TurnOn = <function> defined @Interface\FrameXML\ClassPowerBar.lua:101
 Combo5 = <unnamed> {
 }
 SetPowerTokens = <function> defined @Interface\FrameXML\ClassPowerBar.lua:27
 Combo6 = <unnamed> {
 }
 lastPower = 0
 GetUnit = <function> defined @Interface\FrameXML\ClassPowerBar.lua:10
 ComboBonus3 = <unnamed> {
 }
 powerTokens = <table> {
 }
 UpdateMaxPower = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:119
 AnimIn = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:139
 OnEnter = <function> defined @Interface\FrameXML\ClassPowerBar.lua:65
 TurnOff = <function> defined @Interface\FrameXML\ClassPowerBar.lua:117
 class = "ROGUE"
 ComboBonus5 = <unnamed> {
 }
 SetupDruid = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:60
 OnLoad = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:3
 Combo1 = <unnamed> {
 }
 UpdatePower = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:164
 ComboBonus2 = <unnamed> {
 }
 OnEvent = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:20
 ComboBonus = <table> {
 }
 SetTooltip = <function> defined @Interface\FrameXML\ClassPowerBar.lua:14
 ComboBonus1 = <unnamed> {
 }
 Combo2 = <unnamed> {
 }
 Background = <unnamed> {
 }
 AnimOut = <function> defined @Interface\FrameXML\ComboFramePlayer.lua:150
 ComboBonus4 = <unnamed> {
 }
 maxUsablePoints = 5
}
(*temporary) = "TOP"
(*temporary) = GreyFox_PlayerFrame {
 PlayerFlags = <unnamed> {
 }
 HONOR_LEVEL_UPDATE = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF_Experience\oUF_Experience.lua:343
 UNIT_SPELLCAST_CHANNEL_START = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\elements\castbar.lua:430
 unitEvents = <table> {
 }
 UNIT_MAXHEALTH = <table> {
 }
 LevelClassification = <unnamed> {
 }
 UNIT_POWER_BAR_SHOW = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\elements\power.lua:269
 UNIT_SPELLCAST_NOT_INTERRUPTIBLE = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\elements\castbar.lua:359
 ENABLE_XP_GAIN = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF_Experience\oUF_Experience.lua:343
 style = "Player Frame"
 UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\ouf.lua:46
 UNIT_CONNECTION = <table> {
 }
 UNIT_HEAL_PREDICTION = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\elements\healthprediction.lua:200
 UPDATE_EXPANSION_LEVEL = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF_Experience\oUF_Experience.lua:343
 ARTIFACT_XP_UPDATE = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF_ArtifactPower\oUF_ArtifactPower.lua:320
 unit = "player"
 UNIT_SPELLCAST_DELAYED = <function> defined @Interface\AddOns\oUF_GreyFox\embeds\oUF\elements\castbar.lua:381
 PlayerStatus = <unnamed> {
 }
 UNIT_AURA = <table> {
 }
 TargetingCou
  Reply With Quote
09-09-19, 10:38 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
It still doesn't tell us what part of your code is causing/triggering the error.

Looking at your original code, you have a MyNewFrame being used but not defined and a zzz frame being defined to handle events. And a ComboPointPlayerFrame which is either yours or Blizzards.

How is MyNewFrame created and what is it parented/anchored to ?
If ComboPointPlayerFrame is yours, how is it created ?
What is the file ComboFramePlayer ? Yours or Blizzards.
If yours how is it doing what it is doing?
__________________
  Reply With Quote
09-09-19, 12:07 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Blizzard is probably doing a SetPoint without a corresponding ClearAllPoints on a frame you are also moving.

You could try "killing off" the frames SetPoint function

Code:
frame.SetPoint = function() end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
09-10-19, 08:57 AM   #7
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
MyNewFrame this is my player frame from my ouf layout. I need to set parent because the blizzard default player frame is hidden by the ouf addon. By setting parent, combo point still show, else it will be hidden with the default blizz player frame also.

Code:
ComboPointPlayerFrame
is the default blizzard combo points frame. with zzz frame i anchored the default blizz combo points to my ouf player frame.

Code work fine but spaming errors...
  Reply With Quote
09-10-19, 09:00 AM   #8
GreyFox777
A Cliff Giant
Join Date: Jan 2017
Posts: 75
Originally Posted by Fizzlemizz View Post
Blizzard is probably doing a SetPoint without a corresponding ClearAllPoints on a frame you are also moving.

You could try "killing off" the frames SetPoint function

Code:
frame.SetPoint = function() end
seems to be working
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » lua help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off