Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-30-19, 05:41 PM   #1
MoreUmph
A Defias Bandit
Join Date: Apr 2019
Posts: 3
Loop freezes game on load

Im trying to make a simple addon that switches the action bar if a player has certain spells learned. Dont ask

Without a loop, it works fine, upon reloading the bar switches successfully, but with the loop the game
becomes unresponsive upon load

I look up the 'OnUpdate' event but it says I need a frame to update and bunch of other things, the code I've tried doesnt work and is just too excessive for my needs

Would appreciate a point in the right direction


Code:
local looping = true, a, b, c, d
while looping do
  a = IsSpellKnown(72, false)
  b = IsSpellKnown(73, false)
  c = IsSpellKnown(74, false)
  d = IsSpellKnown(75, false)

  if a and b and c and d then
    ChangeActionBarPage(2)
    looping = false
  end
end
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Loop freezes game on load


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