Miscellaneous

setfflag

Sets a Roblox fast flag by exact name.

ไวยากรณ์

setfflag(name: string, value: any): boolean

Arguments

ชื่อชนิดคำอธิบาย
namestringExact fast flag name to set.
valueanyValue to write. Accepted types depend on the detected flag type.

Returns

ชื่อชนิดคำอธิบาย
updatedbooleantrue when a supported flag value was written, otherwise false.

คำอธิบาย

Sets a Roblox fast flag by exact name. Accepted value types depend on the detected flag type. The function returns true after a supported write and false when the flag is missing, unsupported, or the value is not accepted.

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

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

ตัวอย่าง

Write a fast flag only after checking the flag type that Real detected for the exact name.

local flagName = "SomeFFlagName"
local flagType = getfflagtype(flagName)

if flagType == "bool" then
    print(setfflag(flagName, true))
elseif flagType == "int" then
    print(setfflag(flagName, 60))
elseif flagType == "string" then
    print(setfflag(flagName, "Enabled"))
else
    print(false)
end