When trying to make mods compatible between 4.0.6 and 4.1 I noticed that GetBuildInfo() is still returning 40000 as its 4th value on the PTR, even though the 1st value is "4.1.0". I resorted to this for consistency's sake:
Code:
local clientVersion
do
local version = GetBuildInfo() -- e.g. "4.0.6"
local a, b, c = strsplit(".", version) -- e.g. "4", "0", "6"
clientVersion = 10000*a + 100*b + c -- e.g. 40006
end