> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getnamecallmethod

> 返回存储在 the current namecall method 中的 current Luau namecall atom。该 function 不接受 arguments，并返回 exactly one value。如果 the current namecall method 存在、the current namecall method 大于 0，并且 the current namecall method 为 non-null，它会用 string return 把该 data 作为 string push。否则 push nil。function 不检查 arguments，不从 target object 计算 method name，也不调用任何 metamethod。get_namecall_method 是 getnamecallmethod 的 alias。

<div className="real-function-page">
  ```lua theme={null}
  getnamecallmethod(): string | nil
  ```

  ## 别名

  * `get_namecall_method`

  ## 返回值

  <ResponseField name={"method"} type={"string | nil"}>
    存在且 non-empty 时的 current the current namecall method data string；否则为 nil。
  </ResponseField>

  ## 示例

  Read the current L->namecall string when Real is inside namecall handling.

  ```lua theme={null}
  local method = getnamecallmethod()
  print(method)

  local aliasMethod = get_namecall_method()
  print(aliasMethod)
  ```
</div>
