world.EnableTimer

MUSHclient script function (Method)

Enables or disables an timer

Prototype

long EnableTimer(BSTR TimerName, BOOL Enabled);

Data type meanings

Description

Enables or disables the named timer. An enabled timer is "active", otherwise it is ignored when processing periodic events.

VBscript example

world.EnableTimer "heartbeat", TRUE

Jscript example

world.EnableTimer("heartbeat", true);

PerlScript example

$world->EnableTimer("heartbeat", true);

Python example

world.EnableTimer("heartbeat", True)

Lua example

EnableTimer("heartbeat", true)

Lua notes

The enabled flag is optional, and defaults to true.

Return value

eInvalidObjectLabel: The timer name is not valid
eTimerNotFound: The named timer does not exist
eOK: completed OK

Return code meanings

Related topic

Timers

See also

FunctionDescription
DeleteTimerDeletes a timer
GetTimerGets details about a timer
GetTimerInfoGets details about a timer
GetTimerListGets the list of timers
IsTimerTests to see if a timer exists
ResetTimerResets a named timer
ResetTimersResets all timers