WoWInterface - View Single Post - oUF_AuraBars
Thread: oUF_AuraBars
View Single Post
01-19-15, 04:46 PM   #19
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Possible, certainly, but that snippet you posted has a syntax error on almost every line.

1. The proper format is "for ... do" just like "if ... then" -- you are missing the "do" keyword.

2. You have an "if ... else ... end" inside of a "do ... (end)" but you are missing the last "end" keyword.

3. The second and third lines will throw errors about attempting to concatenate nil values. You need to (a) put quotes around the "oUF_TerennaBoss" part to make it a string value and (b) wrap that and the "..i" in a _G[...] lookup to actually get a refererence to the global object.

for i = 1, 5 do
    if UnitIsUnit('target', 'boss'..i) then
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote