DEBUG_CHANNEL
DEBUG_CHANNEL is an
integer constant that, when passed to
llSay,
llWhisper, or
llShout as a channel
parameter, will print
text to the Script Warning/Error Window. It has the value '2147483647'.
The Script Warning/Error Window can be viewed by either clicking the script alert symbol over an object containing a script printing to the window, or by clicking "Show Script Warning/Error Window" in the Tools menu of the
SecondLife client.
Example Usage:
This can be used to with a simple flag to turn on specific debug messages in your scripts.
Expanded Example Usage:
integer DEBUG = TRUE;
debugPrint(string message)
{
if (DEBUG == TRUE)
{
llSay(DEBUG_CHANNEL, message);
}
}
default
{
state_entry()
{
debugPrint("state_entry called.");
}
}
Constants