View Single Post
08-22-19, 12:27 AM   #10
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
Originally Posted by ChandlerJoseph View Post
okay, thanks for the reply, for the integer loop, is it infinite or does it stop at the end of the table?
It stops at the end of the table:

Lua Code:
  1. for i = 1, #MinimapButtons do

"#MinimapButtons" means the amount of values in MinimapButtons. So if you have 10 minimap buttons it would be:

Lua Code:
  1. for i = 1, 10 do


But it seems more complicated to do what youre doing vs just grabbing the frame and executing the functions
Ofcourse it is more complexe but it also provides much more functionality. Thats your decision.
If you use that code only for yourself you dont need that. But if you are going to public an addon
for anyone your code would be quite useless if other players have minimap buttons that you dont have.
  Reply With Quote