View Single Post
07/15/15, 04:22 PM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,589
[implemented] api version variable in addon manifest

I was just wondering if it would be possible to add a new variable for the addon manifest so that we can make the addon compatible for both api versions on a major patch without having to clutter the code with
Lua Code:
  1. if(GetAPIVersion() == 100011) then
  2. --old
  3. else
  4. --new
  5. end

Something like
Code:
Startup_${apiversion}.lua
which then loads either Startup_100011.lua or Startup_100012.lua depending on the api version.