Register Flag Callback
Signatures
bool registerFlagCallback(string name, function handler)
bool registerFlagCallback(string name, function handler, u64 duration)Description
Registers a handler that will be triggered asynchronously when the specified flag is created, set or deleted.
Returns true if the flag was created or already existed or false once the wait time is exceeded.
Callback
The function callback will be supplied a cause (integer) and a value (bool, integer, double, or string).
local function onFlagChange(cause, value)
--your code
endThe are multiple causes which can trigger a callback:
Identifier
Cause
Value
Example
Arguments
Name
The name of the flag to register.
Handler
The callback function that will be executed.
Duration
The time to wait in milliseconds.
Is optional and set to nothing by default.
If set to anything above 0, it will call Wait Flag.
Last updated