I seem to be having a problem with some utility functions in LSL in a script I am trying to bringing over from a Second Life display screen... This strReplace function from http://wiki.secondlife.com/wiki/Combined_Library which we have used seems to be the problem:

I wonder if someone knows the problem, as the two routines used are indicated as implemented in OpenSim.

For these tests I was using OpenSim 0.7.1.1 and 0.7.2 dev master and Imprudence and SL 2.8.0 viewers, so I think its not a specifuc version or viewer issue.

-----------------------------------------

string strReplace(string str, string search, string replace) {
return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace);
}

default {
    touch_start(integer num){
       llSay(0,"avatar="+llDetectedName(0));
       llSay(0,"avatar_mod="+strReplace(llDetectedName(0)," ","_"));
    }
}

------------------------------------------------
The first line works, the second just lists when touched by an avatar with a name like "Ai Austin" it is meant to be able to replace the spaces with underscores and produce "Ai_Austin" but it actually seems to return the null string in OpenSim 0.7.2 dev master r/16364 anyway.

avatar=Ai Austin
avatar_mod=


_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to