[Opensim-users] Opensim-users Digest, Vol 47, Issue 49
dz
dz at bitzend.net
Thu Jul 28 15:25:50 UTC 2011
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, <opensim-users-request at lists.berlios.de>wrote:
> Send Opensim-users mailing list submissions to
> opensim-users at lists.berlios.de
>
> 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
> opensim-users-request at lists.berlios.de
>
> You can reach the person managing the list at
> opensim-users-owner at lists.berlios.de
>
> 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 <ai.ai.austin at gmail.com>
> To: opensim-users at lists.berlios.de
> 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 <neil at knowsense.co.uk>
> To: opensim-users at lists.berlios.de
> 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 <ai.ai.austin at gmail.com> 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
>> Opensim-users at lists.berlios.de
>> https://lists.berlios.de/**mailman/listinfo/opensim-users<https://lists.berlios.de/mailman/listinfo/opensim-users>
>>
>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110728/52f81900/attachment.html>
More information about the Opensim-users
mailing list