Metatables

getnamecallmethod

Returns the namecall method currently being invoked.

Syntax

getnamecallmethod(): string | nil
Aliases get_namecall_method

Returns

NameTypeDescription
methodstring | nilCurrent namecall method, or nil outside namecall handling.

Description

Returns the namecall method currently being invoked.

Call it without parameters. The function reads the needed context from the current runtime state.

It returns method (string | nil). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = getnamecallmethod()
print(result)