View Single Post
03-12-11, 03:59 PM   #3
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
local a, b, c, d = string.split("4.0.6.06")
-- a is now "4", b is "0", c is "6" and d is "06"

You can convert these 4 variables to numbers with tonumber(), but you can also do math (number coercion) such as

local version = a*10000 + b*1000 + c*100 + d

and compare the number.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
  Reply With Quote