Yes, The old LSL memory optimization "tricks" of nulling a list or a string before concatination do NOT transfer well. D
On Thu, Jul 28, 2011 at 3:00 AM, <[email protected]>wrote: > Send Opensim-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.berlios.de/mailman/listinfo/opensim-users > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Opensim-users digest..." > > Today's Topics: > > 1. strReplace not functioning in OpenSim? (Ai Austin) > 2. Re: strReplace not functioning in OpenSim? (Neil Canham) > > > ---------- Forwarded message ---------- > From: Ai Austin <[email protected]> > To: [email protected] > Date: Wed, 27 Jul 2011 17:17:18 +0100 > Subject: [Opensim-users] strReplace not functioning in OpenSim? > 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 <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= > > > > > > ---------- Forwarded message ---------- > From: Neil Canham <[email protected]> > To: [email protected] > Date: Wed, 27 Jul 2011 18:00:09 +0100 > Subject: Re: [Opensim-users] strReplace not functioning in OpenSim? > The issue seems to be the (str = "") in strReplace - not sure what that > does, maybe some kind of SL-specific memory optimisation? Removing that > made it work for me. > > Neil Canham > CTO vComm Solutions GmbH > > On Wed, Jul 27, 2011 at 5:17 PM, Ai Austin <[email protected]> wrote: > >> 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 >> <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<https://lists.berlios.de/mailman/listinfo/opensim-users> >> > > > _______________________________________________ > Opensim-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/opensim-users > >
_______________________________________________ Opensim-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-users
