Script

decompilebatch

Schedule many scripts on the decompiler worker pool and yield until every result is ready. Used by saveinstance and saveplace so a place save can decompile in parallel before writing the file.

Syntax

decompilebatch(scripts: {LuaSourceContainer | string}, options: DecompilerOptions?): {string}

Parameters

scripts{LuaSourceContainer | string}required

The scripts or bytecode blobs to decompile together.

optionsDecompilerOptionsoptional

Optional pass and formatter settings.

Returns

{string}

One source string per input, in the same order. Failed slots are error comments.

Example

Decompile several scripts in one yield.

local list = getscripts()
local sources = decompilebatch(list)
print(#sources)