User:WrGodLikeBeing Resident: Difference between revisions
Jump to navigation
Jump to search
Created page with "This is an example of how you can embed debugging information in your code, and switch it off without having to remove it all <lsl> integer DEBUG = TRUE; // set false to turn off…" |
No edit summary |
||
Line 1: | Line 1: | ||
{{LSL Header}} | |||
This is an example of how you can embed debugging information in your code, and switch it off without having to remove it all | This is an example of how you can embed debugging information in your code, and switch it off without having to remove it all | ||
<lsl> | <lsl> |
Latest revision as of 06:17, 6 August 2013
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
This is an example of how you can embed debugging information in your code, and switch it off without having to remove it all <lsl> integer DEBUG = TRUE; // set false to turn off debugging
debug( string text ){
if( DEBUG ) llOwnerSay( text );
}
default {
state_entry(){ debug( "This is only displayed when DEBUG is TRUE" ); llSetTimerEvent(5.0); } timer(){ debug("Wake Up!"); if( !DEBUG ) llSetTimerEvent(0.0); }
} </lsl>