Jump to content

  • Curse Sites
Help

Help with a script


  • Please log in to reply
5 replies to this topic

#1 Smetig

Smetig
  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 559
  • Talents: Subtlety
  • RBG: 384
  • LocationNone of your business fucker

Posted 27 April 2012 - 01:23 PM

Hi,

I have an issue that I get fps lag whenever I use

/run FocusFrameSpellBar:SetScript("OnShow", nil) FocusFrameSpellBar:SetParent(UIParent) FocusFrameSpellBar:ClearAllPoints() FocusFrameSpellBar:SetPoint("CENTER",UIParent,"CENTER",0,110) FocusFrameSpellBar:SetScale(1.8)

Havent had problems with it in the past :/

Anyone have a clue why?
Posted Image

#2 Thaya

Thaya
  • Moderators
  • Posts: 2153
  • LocationRussia

Posted 27 April 2012 - 01:47 PM

It's most likely because you kill the function that triggers on "OnShow" event instead of making it an empty function, so it starts spamming errors on every update (since the function doesn't exist). It's much more eloquent to make an empty function out of SetPoint anyway to prevent it repositioning.

Try like this:
/run FocusFrameSpellBar:ClearAllPoints() FocusFrameSpellBar:SetPoint("CENTER",UIParent,"CENTER",0,110) FocusFrameSpellBar:SetScale(1.8) FocusFrameSpellBar.SetPoint=function() end

Edited by Thaya, 27 April 2012 - 01:49 PM.

Default UI Scripts - Compilation & how-to

#3 Smetig

Smetig
  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 559
  • Talents: Subtlety
  • RBG: 384
  • LocationNone of your business fucker

Posted 27 April 2012 - 02:13 PM

View PostThaya, on 27 April 2012 - 01:47 PM, said:

It's most likely because you kill the function that triggers on "OnShow" event instead of making it an empty function, so it starts spamming errors on every update (since the function doesn't exist). It's much more eloquent to make an empty function out of SetPoint anyway to prevent it repositioning.

Try like this:
/run FocusFrameSpellBar:ClearAllPoints() FocusFrameSpellBar:SetPoint("CENTER",UIParent,"CENTER",0,110) FocusFrameSpellBar:SetScale(1.8) FocusFrameSpellBar.SetPoint=function() end


Tnx Thaya!!
Posted Image

#4 Xhanon

Xhanon
  • Junkies
  • Orcclass_name
  • EU-Kazzak
  • Misery
  • Posts: 338
  • Talents:
  • RBG: 2280
  • LocationDenmark

Posted 27 April 2012 - 05:33 PM

View PostThaya, on 27 April 2012 - 01:47 PM, said:

It's most likely because you kill the function that triggers on "OnShow" event instead of making it an empty function, so it starts spamming errors on every update (since the function doesn't exist). It's much more eloquent to make an empty function out of SetPoint anyway to prevent it repositioning.

Try like this:
/run FocusFrameSpellBar:ClearAllPoints() FocusFrameSpellBar:SetPoint("CENTER",UIParent,"CENTER",0,110) FocusFrameSpellBar:SetScale(1.8) FocusFrameSpellBar.SetPoint=function() end
RUSSIAN ROCKET SIENCE

#5 Durial

Durial
  • Junkies
  • Blood Elfclass_name
  • EU-Talnivarr
  • Reckoning / Abrechnung
  • Posts: 885
  • Talents:
  • RBG: 576
  • LocationEngland, London

Posted 27 April 2012 - 06:21 PM

*Slowly clicks away from topic because so confuss*

#6 misios

misios
  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 1419
  • Talents: Destruction
  • LocationNorway

Posted 27 April 2012 - 06:52 PM

I is a rocketscientist, and the equation for this formula be like this:

Spoiler

Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<