構文
setfflag(name: string, value: any): boolean引数
| 名前 | 型 | 説明 |
|---|---|---|
name | string | Exact fast flag name to set. |
value | any | Value to write. Accepted types depend on the detected flag type. |
戻り値
| 名前 | 型 | 説明 |
|---|---|---|
updated | boolean | true 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.
2 個のパラメータで呼び出します: name, value。引数表では必須値と動作を調整する値を確認できます。
updated (boolean) を返します。戻り値表を使って成功値、nil 結果、回復可能なエラーを分けて扱ってください。
例
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