ScriptInterface:AppVersion()

Version added: 9.5

Added in version 9.5 - Gets the AS version number as a text string

Return type: char

Examples of how to get the version as a decimal number (can be useful if the version is something like "10.1.1", which cannot be converted to a number using "tonumber").

ex1 - strip off the second and any later point versions:
if moho.AppVersion ~= nil then
local sVersion = string.gsub(moho:AppVersion(), "^(%d+)(%.%d+)(%..+)", "%1%2")
version = tonumber(sVersion)
end



ex2 - builds a decimal number assuming point versions will not be greater than 9 (i.e. nn.9.9.9.9)
local order = 1
local numVers = 0
local n
local vers = moho:AppVersion() -- assumes AS9.5 or later
for n in string.gmatch (vers, "%d+%.*") do
numVers = numVers + (n * order)
order = order / 10
end
print (numVers)
String "AppVersion" is found in the following scripts:

HS Randomise Particles (by hayasidist)

MR Path (by eugenebabich)

MR Key Motion (by eugenebabich)

HS Shape (by hayasidist)

SS - SVG Import (by simplsam)

See all...