Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Permanent storage for config string

Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
01-16-2007 00:54
Hi there! I'm encountering a problem in saving the config string for an attachement.

Let's say that I've a Magical Hat from which I can pull off objects. It may be configured (e.g. pull out rabbits rather then flowers) and the configuration is a simple, long string (<127 char).

I used to store this string with llSetObjectDesc() so to preserve its configuration from use to use (I reparsed the config string on re-attach).

I clearly remember it worked seamlessly but since two days this mechanism seems broken! I can store the configuration with llSetObjectDesc() but it would disappear on detach!

There are three possible causes for this:

1) I only *thought* it worked but this mechanism is not supposed to preserve object descriptions on detach;
2) The mechanism is fine but I messed up with objects permissions or other flags that might negatively impact them (the code didn't change but I transferred it into another object)
3) The recent issues with asset server broke this funcionality in SL.

Whatever the cause (and if you have any idea please let me know!) I'm wondering if there is any reliable method to make a configuration string to survive on detach.

Any suggestions?

Thanks
Rael
Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
01-16-2007 01:28
... An addition

When I asked in chat a couple of days ago somebody mentioned llEmail().

Anyone tried it? I thought the object key changes upon detach/reattach so I can't figure out to whom I should send the email to!!

Rael
Woopsy Dazy
Registered User
Join date: 12 Nov 2006
Posts: 173
01-16-2007 01:38
Not sure what your asking. You can setup an email server that you never re-rez. That way you will always know where to email. I recall the email contains key of the sender so there's no problem to respond, or put the sender key in subject.

If you have special behavior for each "hat" and you want to do different things depending on each and everyone you might have to hard-code a specific key in the code or a notecard of the "hat", like a serial number.

Good luck!
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-16-2007 01:49
Name and Description is how I normally store small amounst of data and I have not noticed anything not working recently.

The email server is still not perm as it can be reset just like any other script.

You are using strings to decide what youa re rezzing, but how do you define each string, are they hardcoded items in inventory or keys in a list? Either way the list index number may be a 'smaller' way fo storing the item if the list is constant.
Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
01-16-2007 01:59
Newgate, I think you were among those that answered when I asked this in the Scripters chat.

I tested it again yesterday.

Basically when the hat is attached, I retrieve the string with llGetObjectDesc(). If it is empty I store the default one with llSetObjectDesc() and proceed.

Everything works fine as I use the hat, change the configuration, read it, change the config again, re-read it ....

It is only when I detach it that I see the issue. Note that If I open the object properties in the UI I found nothing there! And also if I modify the description by hand, the new description doesn't appear!

If this shouldn't happen (as I suspect) I'll raise a support request with Lindens.

Thanks,
Rael
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-16-2007 02:58
From: Rael Delcon
Newgate, I think you were among those that answered when I asked this in the Scripters chat.

I tested it again yesterday.

Basically when the hat is attached, I retrieve the string with llGetObjectDesc(). If it is empty I store the default one with llSetObjectDesc() and proceed.

Everything works fine as I use the hat, change the configuration, read it, change the config again, re-read it ....

It is only when I detach it that I see the issue. Note that If I open the object properties in the UI I found nothing there! And also if I modify the description by hand, the new description doesn't appear!

If this shouldn't happen (as I suspect) I'll raise a support request with Lindens.

Thanks,
Rael


Not sure what you mean by 'Scripters Chat?' do you mean this forum?
But i think you are running into the problem disccussed here
Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
01-16-2007 03:25
From: someone

Not sure what you mean by 'Scripters Chat?' do you mean this forum?


I meant the in-world "Scripters of Second Life" Group Instant Messaging. But I might be wrong :) .

From: someone

But i think you are running into the problem disccussed here


Exactly!

So in the end it was point 2) of my initial post! The "modify" flag prevented the script to be reset and, hence, the description to be cleared! When I created the new object with different flags, that behavior changed.

Thanks so much Newgate!

Unfortunately I wanted to have the object modifiable by next user! In fact I wanted it to be full pem! :(

Woopsy, I don't think I understand you suggetsion.

I could send an object to llGetKey()+"@lsl.secondlife.com with the configuration in and try to retrieve it with llGetNextEmail() but, to my understanding, this would fail as the object would get a new key once detached and re-attached.

Mmmm..... Can I get an email sent to an Avatar? I doubt ....


Rael
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-16-2007 04:20
From: Rael Delcon
I meant the in-world "Scripters of Second Life" Group Instant Messaging. But I might be wrong :) .


Yes I'm afraid you're wrong :) I'm not a member of that or any other group.

From: Rael Delcon

Exactly!

So in the end it was point 2) of my initial post! The "modify" flag prevented the script to be reset and, hence, the description to be cleared! When I created the new object with different flags, that behavior changed.

Thanks so much Newgate!

Unfortunately I wanted to have the object modifiable by next user! In fact I wanted it to be full pem! :(

Woopsy, I don't think I understand you suggetsion.

I could send an object to llGetKey()+"@lsl.secondlife.com with the configuration in and try to retrieve it with llGetNextEmail() but, to my understanding, this would fail as the object would get a new key once detached and re-attached.

Mmmm..... Can I get an email sent to an Avatar? I doubt ....


Rael


You dont necessarily need to know the key of the item, only some form of ID.
This could be hardcoded, held in a notecard or just a variable. Even if a sim is reset, the script will NOT lose its data, it will just be rolled back to the last known good working version.

What Woopsy was suggesting was that you have a server object somewhere in world. You rez it and never derez it.
You then use its key as the destination/receipient in the emails from your objects, passing their unique ID (NOT THEIR KEY)
The server will look up the id and send back an email containing the relevant data.
Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
01-16-2007 05:24
From: someone
What Woopsy was suggesting was that you have a server object somewhere in world. You rez it and never derez it.


Now I think I got it :)

Thanks.

Rael