Difference between revisions of "DEBUG CHANNEL"

From Second Life Wiki
Jump to navigation Jump to search
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LSL Constant
<onlyinclude>{{#vardefine:DEBUG_CHANNEL|{{LSL Const|DEBUG_CHANNEL|integer|hex=0x7FFFFFFF|ihex=2147483647|c=Chat channel reserved for script debugging and error messages, broadcasts to all nearby users.}}}}</onlyinclude>{{LSL Constant
|name=DEBUG_CHANNEL
|name={{#var:cname}}
|type=integer
|type={{#var:type}}
|value={{LSL Hex|0x7FFFFFFF}}
|hvalue=0x7FFFFFFF
|desc=Chat channel reserved for debug and error messages from scripts. The client will display these in the script console.
|value=2147483647
|desc=Chat channel reserved for script debugging and error messages. The client will display chat on this channel in the script console if the avatar is within the appropriate distance for the communication type (see {{LSLGC|Chat}} for details).
 
Server-generated errors are broadcast the same distance as [[llSay]].
 
Regardless of the source, most viewers filter out messages received on '''DEBUG_CHANNEL''' from objects owned by others.
|examples
|examples
|comment={{#var:comment}}
|constants=
|constants=
{{LSL DefineRow||[[PUBLIC_CHANNEL]]|}}
{{LSL ConstRow|PUBLIC_CHANNEL}}
{{LSL ConstRow|COMBAT_CHANNEL}}
|functions=
|functions=
{{LSL DefineRow||[[llWhisper]]|}}
{{LSL DefineRow||[[llWhisper]]|}}
{{LSL DefineRow||[[llSay]]|}}
{{LSL DefineRow||[[llSay]]|}}
{{LSL DefineRow||[[llShout]]|}}
{{LSL DefineRow||[[llShout]]|}}
{{LSL DefineRow||[[llDialog]]|}}
{{LSL DefineRow||[[llRegionSay]]|}}
{{LSL DefineRow||[[llRegionSayTo]]|}}
{{LSL DefineRow||[[llListen]]|}}
{{LSL DefineRow||[[llListen]]|}}
|events=
|events=
{{LSL DefineRow||[[listen]]|}}
{{LSL DefineRow||[[listen]]|}}
|cat1
|helpers=
|cat2
<source lang="lsl2">key owner;
|cat3
 
|cat4
default{//little link_message debugging script
    link_message(integer a, integer b, string c, key d){
        llSay(DEBUG_CHANNEL, llList2CSV([a,b,c,d]));
        if(llGetOwner() != owner)
            llSetScriptState(llGetScriptName(), FALSE);
    }
    state_entry(){
        owner = llGetOwner();
    }
}</source>
|location=
'linden\indra\llcommon\indra_constants.h' as CHAT_CHANNEL_DEBUG (with a value of S32_MAX)
|cat1=Chat
}}
}}

Latest revision as of 01:58, 15 August 2024

Description

Constant: integer DEBUG_CHANNEL = 0x7FFFFFFF;

The integer constant DEBUG_CHANNEL has the value 0x7FFFFFFF

Chat channel reserved for script debugging and error messages. The client will display chat on this channel in the script console if the avatar is within the appropriate distance for the communication type (see Chat for details).

Server-generated errors are broadcast the same distance as llSay.

Regardless of the source, most viewers filter out messages received on DEBUG_CHANNEL from objects owned by others.

Caveats


Related Articles

Constants

•  PUBLIC_CHANNEL
•  COMBAT_CHANNEL

Functions

•  llWhisper
•  llSay
•  llShout
•  llRegionSay
•  llRegionSayTo
•  llListen

Events

•  listen

Useful Snippets

key owner;

default{//little link_message debugging script
    link_message(integer a, integer b, string c, key d){
        llSay(DEBUG_CHANNEL, llList2CSV([a,b,c,d]));
        if(llGetOwner() != owner)
            llSetScriptState(llGetScriptName(), FALSE);
    }
    state_entry(){
        owner = llGetOwner();
    }
}

Deep Notes

Search JIRA for related Issues

Source

'linden\indra\llcommon\indra_constants.h' as CHAT_CHANNEL_DEBUG (with a value of S32_MAX)

Signature

integer DEBUG_CHANNEL = 0x7FFFFFFF;//Chat channel reserved for script debugging and error messages, broadcasts to all nearby users.