View Single Post
06/26/14, 05:10 AM   #4
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by farangkao View Post
As far as i know it's not there, however...

you can use the trick to check for new Functions or Globals (introduced in a certain version)

for example:
Lua Code:
  1. function GetAPIVersion()
  2.   if GetTradingHouseListingItemLink then return 10007 end  
  3.   return 10003
  4. end
I've not tested this example code (just in my mind), basically if a function doesn't exists it returns nil, and therefore the "if" statement fails and goes to the next line.
That is a way if I know of a specific change beforehand (because it was on the PTS). But it requires me to design the code for each new version.
Better then just deletion everytime _VERSION (the build version of the client) changed.

Last edited by zgrssd : 06/26/14 at 05:13 AM.