callLuaFunc

Calls a Lua function with the given name and arguments.

public @system
T
callLuaFunc
(
T
string funcName
)
(
lua_State* state
,)

Parameters

state lua_State*

The Lua state, where the function is located. ... = The arguments to be passed to the function. Template params:

T

The return type.

funcName

The name of the function.

Return Value

Type: T

An expected return type, which can be set to a tagged algebraic type to avoid potential mismatches.

Throws

A LuaException if the return type isn't matched, the execution ran into an error, or the function isn't found.

Meta