View Single Post
08-21-19, 08:42 AM   #3
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
Any instance of "in pairs" loops:
Lua Code:
  1. for _, Frame in pairs(MinimapButtons) do
  2.     Frame:SetAlpha(0)
  3. end

should be written as:
Lua Code:
  1. for i = 1, #MinimapButtons do
  2.     MinimapButtons[i]:SetAlpha(0)
  3. end

or something similar. "in pairs" uses more CPU than just running through the table's values with an integer for loop.
  Reply With Quote