world.Trace

MUSHclient script function (Property)

Trace mode property

Prototype

boolean Trace;

Data type meanings

Description

Set to 1 to turn trace mode on, 0 to turn it off.

When trace mode is on debug messages appear in the output window. These occur when:

1. A trigger matches
2. A timer fires
3. An alias matches
4. A script executes
5. A script calls TraceOut.

VBscript example

world.trace = 1   ' turn trace on
world.trace = 0   ' turn trace off
world.note world.trace  ' display whether trace is on

Jscript example

world.trace = 1;   // turn trace on
world.trace = 0;   // turn trace off
world.Note(world.Trace);  // display whether trace is on

PerlScript example

$world->{trace} = 1;   # trace mode on
$world->{trace} = 0;   # trace mode off
$world->note($world->{trace});  # display whether trace is on

Python example

world.trace = 1   # turn trace on
world.trace = 0   # turn trace off
world.Note(world.Trace)  # display whether trace is on

Lua example

SetTrace (true)   -- turn trace on
SetTrace (false)   -- turn trace off
Note(GetTrace ())  -- display whether trace is on

Lua notes

Lua implements this as two functions:

GetTrace - gets whether tracing occurs
SetTrace - sets whether tracing occurs

The argument is optional, and defaults to true.

Return value

This is a property. You can use it to find whether trace mode is on.

Related topic

Utilities

See also

FunctionDescription
TraceOutOutputs the supplied message to the world Trace