View Single Post
03-19-13, 07:55 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code:
if UnitLevel("player") == MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()] then
    return
end
Just stick that at the top of the file. You don't need to wrap the rest of the file in an "else-end" block; "return" in the file-level scope stops execution of the rest of the file.
__________________
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