ScriptInterface:AppVersion()
Version added: 9.5
Added in version 9.5 - Gets the AS version number as a text string
Return value:
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:
ex2 - builds a decimal number assuming point versions will not be greater than 9 (i.e. nn.9.9.9.9)
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)
endex2 - 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)Search results
Usage of 'AppVersion' is found in the following scripts:
SS - Make Bones (Original Edition) by simplsam
View Code
MR Guides (Original Edition) by eugenebabich
View Code
SS - Virtual Bones (Original Edition) by simplsam
View Code
MR Overlay (Moho 13.5 Edition) by eugenebabich
View Code
FO_Utilities (Original Edition) by Lukas
View Code
Switch hands organizer (Original Edition) by A.Evseeva
View Code
Print Globals to HTML (Original Edition) by hayasidist
View Code
Spirograph (Original Edition) by hayasidist
View Code