WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   lua help (https://www.wowinterface.com/forums/showthread.php?t=57439)

GreyFox777 09-07-19 07:40 PM

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?

zork 09-09-19 02:04 AM

A more precise Lua error message would be nice aswell as the full addon code.
Second: wrong forum.

Xrystal 09-09-19 05:06 AM

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.

GreyFox777 09-09-19 07:54 AM

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


Xrystal 09-09-19 10:38 AM

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?

Fizzlemizz 09-09-19 12:07 PM

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

GreyFox777 09-10-19 08:57 AM

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...

GreyFox777 09-10-19 09:00 AM

Quote:

Originally Posted by Fizzlemizz (Post 333672)
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 :)


All times are GMT -6. The time now is 03:34 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI