Difference between revisions of "User:Free Portal/Sandbox"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 13: Line 13:
search replace string
search replace string
<lsl>string searchReplace(string input, string old, string new) {
<lsl>string searchReplace(string input, string old, string new) {
  return llDumpList2String(llParseString2List(input, [old], []), new);
    return llDumpList2String(llParseString2List(input, [old], []), new);
}</lsl>
</div>
</div>
 
<div id="box">
== DEBUG ==
<div style="padding: 0.5em 0.5em 1.5em">
print debug message
<lsl>integer debug = TRUE;
string DEBUG(string msg) {
    if (DEBUG) {
        llOwnerSay("__" + llGetObjectName() + " :: " + llGetScriptName() + " :: " + msg
}</lsl>
}</lsl>
</div>
</div>
</div>
</div>

Revision as of 20:19, 9 March 2010

SandBox

Usefull user function package for LSL

searchReplace

search replace string <lsl>string searchReplace(string input, string old, string new) {

   return llDumpList2String(llParseString2List(input, [old], []), new);

}</lsl>

DEBUG

print debug message <lsl>integer debug = TRUE; string DEBUG(string msg) {

   if (DEBUG) {
       llOwnerSay("__" + llGetObjectName() + " :: " + llGetScriptName() + " :: " + msg

}</lsl>