Skip to content

Execute

Executes Lua code in a specified resource context.

Syntax

lua
Ham.Execute(resourceName, code)

Parameters

NameTypeDescription
resourceNamestringTarget resource name (use "isolated" for isolated context)
codestringLua code to execute

Returns

  • boolean - true if execution was successful

Example

lua
Ham.Execute("isolated", "print('Hello from isolated context')")

Released under the ISC License.