Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

notecards as lists

Timmins Hamilton
Registered User
Join date: 15 May 2004
Posts: 68
07-17-2004 14:51
Hi people

After spending some time searching these forums and the WIKI I can still not find out how to get a script to dump the contents of a list to a notecard and read it back.

I want a script to keep track of lists of names of people who are apprived access. Currently the list is edited manually in the script. However it would be good for the script to be able to offer commands for adding/suspending/removing names to/from the list. This is easy, but of course the list will be reset if the script is. So I want the script to dump the contents of the list to a notecard (stored in the same object - or possibly in a central control object even!) when the list has been updated and read it in from the notecard when the script is initialised etc.

I am sure that this is possible, but dont know how.

Any clues would be gratefully recieved even if its just somewhere to start looking.

Regards

Timmins
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-17-2004 15:55
Im afraid we do not currently have any ability to write to a notecard.

Here's a feature suggestion discussing it though:
/13/33/12462/1.html
Timmins Hamilton
Registered User
Join date: 15 May 2004
Posts: 68
Oh Bother!
07-19-2004 02:28
Thanks for your response Christopher.

Do I take it then that there is no way to store a list that will not be reset when the object is reset? This really is a pain!

I see people talking about email and xml-rpc but dont understand how these can help - unless you can use xml-rpc to connect to a remote database etc.

Any idea?
Cray Levy
Member
Join date: 7 Jul 2004
Posts: 33
Re: Oh Bother!
07-19-2004 02:44
From: someone

I see people talking about email and xml-rpc but dont understand how these can help - unless you can use xml-rpc to connect to a remote database etc.


You can. Though you can't currently open a connection from LSL, you can send an email that causes a remote host to open an XML-RPC connection to your object. This took only several seconds when I tried, and one XML-RPC message-reply cycle took a couple of seconds (where 'a couple' is slightly less than 'several' ;).

A rough estimate is about 500 lines of code in total (LSL and perl). My code does something slightly different, so I can't give any exact numbers.
Timmins Hamilton
Registered User
Join date: 15 May 2004
Posts: 68
Further ideas....
07-19-2004 02:59
What about creating an inventory item - providing that you can do that - for each user that is added to the list?

Say add an item with a name such as:

KEY: Timmins Hamilton

then the script looks for all items in the inventory that start with KEY: and extracts the name and adds it to the list on reset.

Would that work?
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-19-2004 04:27
you can't change the names of or create inventory objects.

What you can do instead is change the names of sub-pirms in an object, use their texture faces to store keys, store floats in texture rotation, scale & offset. You can store data perminantly anywhere you have Set & Get commands.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
David Czukor
Prole
Join date: 8 Jun 2004
Posts: 16
07-19-2004 05:01
Strife,

I'm glad you brought this up, 'cause I saw it in Wiki but I didn't understand it. How can you store data in a texture face? Can you use the technique to store strings?

-- D
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-19-2004 06:22
well a key is really a hexadecimal representation of 128 bits aka 4 integers. So you write a function to stuff integers into keys. not the prettiest of solutions but it works. (there were other threads that went into this, before the great reset)

this is because you can store any key as the texture name, there doesn't actualy have to be a texture with that UUID.

here are the max numbers of texture faces you can have on different shapes (correct me if i'm wrong)

box 9 (9 normal)
tube 9 (7 normal, 2 advanced cut)
prism 8 (8 normal)
sphere 6 (4 normal, 2 advanced cut)
cylinder 6 (6 normal)
torus 6 (4 normal, 2 advanced cut)
(regular faces plus 2 for cut and 1 for hollow make up normal)

Overall you can't store much data in a prim's faces and associated variables. i would estimate it at about 1900 bits. or about 60 integers.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey