ไวยากรณ์
getscriptclosure(script: userdata): functionAliases
getscriptfunctionArguments
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
script | userdata | สคริปต์หรืออินสแตนซ์ ModuleScript เพื่อตรวจสอบ |
Returns
| ชื่อ | ชนิด | คำอธิบาย |
|---|---|---|
closure | function | สร้างฟังก์ชันการปิด |
คำอธิบาย
ส่งกลับการปิด callable ที่เกี่ยวข้องกับอินสแตนซ์ของสคริปต์
เรียกด้วย parameter 1 ค่า: script ตาราง arguments อธิบายค่าที่จำเป็นและค่าที่ปรับพฤติกรรม
ส่งคืน closure (function) ใช้ตาราง returns เพื่อแยกค่าที่สำเร็จ ผลลัพธ์ nil และ error ที่จัดการต่อได้
ตัวอย่าง
ตัวอย่างการเรียกใช้ด้วยค่าตัวอย่าง
local result = getscriptclosure(game)
print(result)