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