สคริปต์

getscripthash

ส่งคืนแฮชที่เสถียรสำหรับสคริปต์เมื่อมี bytecode

ไวยากรณ์

getscripthash(script: userdata): string | nil

Arguments

ชื่อชนิดคำอธิบาย
scriptuserdataสคริปต์หรืออินสแตนซ์ ModuleScript เพื่อตรวจสอบ

Returns

ชื่อชนิดคำอธิบาย
hashstring | nilสตริงแฮช หรือไม่มีเมื่อการแฮชไม่พร้อมใช้งาน

คำอธิบาย

ส่งคืนแฮชที่เสถียรสำหรับสคริปต์เมื่อมี bytecode

เรียกด้วย parameter 1 ค่า: script ตาราง arguments อธิบายค่าที่จำเป็นและค่าที่ปรับพฤติกรรม

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

ตัวอย่าง

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

local result = getscripthash(game)
print(result)