Skip to main content

Create VM

Initializes LuaVM of the specified version

Function CreateVM(Val Version, Val Logging = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Version-String✔VM version: Lua54, LuaJIT
Logging-Structure Of KeyAndValue✖Logging settings. See GetLoggingSettings
Returns

Arbitrary - AddIn object

tip

An error during VM creation will throw an exception

Caution

NOCLI: this method is not available in CLI version

1C:Enterprise/OneScript code example
Result = OPI_Lua.CreateVM("Lua54");
Result
NOT JSON: OneScript.StandardLibrary.NativeApi.NativeApiComponent