Allows you to cancel all queued and timed calls associated with a specific function...
Â
Syntax
Queues are timers...
The queue() function uses the timer functionality behind the scenes, so when you use removeTimer() it will remove both timers and queued calls for the specified function.
removeTimer(functionName);
Parameters
Parameter
Mandatory
Type
Description
Game version
functionName
String
All timers (including queued function calls) associated with the named function (referenced by it's name in quotes) will be cancelled.
3.1 Beta 1
Return value
Value
Type
Description
Game version
undefined
Undefined
The timers/queues associated with the function have been removed.
3.1 Beta 1
<error>
Error
Did you forget to specify functionName as a string?
3.1 Beta 1
Example
Removing timers and queued calls...
function foo() {
// do stuff
}
setTimer("foo", 1000);
queue("foo", 2000);
Â
removeTimer("foo"); // cancel both the timer and the queue