Skip to content
MetatablesOverview

setnamecallmethod

Represents modification of method-dispatch metadata.

Aliasesset_namecall_method

Details#

Changes the method name used by the current namecall dispatch context. It does not rename a table field. The example only writes back a nonempty method name that is already present.

Examples#

Example

Luau
local ok, method = pcall(getnamecallmethod)
if ok and type(method) == "string" and method ~= "" then
    setnamecallmethod(method)
end