Metatables

getnamecallmethod

ส่งคืนวิธีการ namecall ที่กำลังเรียกใช้อยู่

ไวยากรณ์

getnamecallmethod(): string | nil
Aliases get_namecall_method

Returns

ชื่อชนิดคำอธิบาย
methodstring | nilวิธีการ namecall ปัจจุบัน หรือไม่มีการจัดการ namecall ภายนอก

คำอธิบาย

ส่งคืนวิธีการ namecall ที่กำลังเรียกใช้อยู่

เรียกโดยไม่ต้องมี parameter ฟังก์ชันอ่าน context ที่ต้องใช้จาก runtime state ปัจจุบัน

ส่งคืน method (string | nil) ใช้ตาราง returns เพื่อแยกค่าที่สำเร็จ ผลลัพธ์ nil และ error ที่จัดการต่อได้

ตัวอย่าง

ตัวอย่างการเรียกใช้ด้วยค่าตัวอย่าง

local result = getnamecallmethod()
print(result)