Don't click here unless you want to be banned.

LSL Wiki : DEBUG_CHANNEL

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl423.us.archive.org

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:
default {
    state_entry() {
        llSay(DEBUG_CHANNEL, "This is some debug text");
    }
}

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
Comments [Hide comments/form]
Attach a comment to this page: