Thread Tools Display Modes
Prev Previous Post   Next Post Next
10/19/14, 03:03 AM   #1
klaro00
 
klaro00's Avatar
Join Date: Apr 2014
Posts: 31
How to find out API version

Hi,

ist there a reliable, robust way to find out the API version under which an addon is running? This would be useful when changing addon code in order to support an upcoming ESO version on the PTS server if the addon should run on both the current and the future API version.

I couldn't find any function like GetAPIversion() or so. Is there any?

I was thinking of writing such a function by examining "typical properties" of a certain API version, such as the existence of a function or a global value, like this:

Lua Code:
  1. function GetAPIVersion()
  2.     if not functionWhichWasRemovedInVersion100010 then
  3.         return 100010
  4.     end
  5.  
  6.     return 100009
  7. end

The shown approach is not very reliable since it checks for existence of a "magic" function which is no longer supported in a certain API version.

Maybe there is a better way? Any ideas?

// Klaro

Last edited by klaro00 : 10/22/14 at 01:13 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » How to find out API version


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off