Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Writing to a Notecard

Tommy Oz
Registered User
Join date: 13 Jan 2005
Posts: 56
01-29-2005 12:12
Can a script write to a Notecard? Or any other way to persistantly save text that can be reaccessed later.
offstar Charming
Registered User
Join date: 26 Dec 2004
Posts: 22
01-29-2005 13:47
From: Tommy Oz
Can a script write to a Notecard?


Nope. :(

Also scripts can't read complex notecards (those which contain anything other than plain text).
Nogard Codesmith
Second Life Resident
Join date: 24 Nov 2004
Posts: 191
01-29-2005 13:48
From: Tommy Oz
Can a script write to a Notecard? Or any other way to persistantly save text that can be reaccessed later.

No, and I can't think of any bloody good reason why not!

The only thing I can think of is that maybe they are worried that the asshat sever will drown in a sea of notecards if we are allowed to do this.
Oneironaut Escher
Tokin White Guy
Join date: 9 Jul 2003
Posts: 390
01-29-2005 14:10
That's it exactly Nogard. The Asset server is already overburdened with object data, which if you think about it, each object is just a few parameters to keep up with. Compare that to the complexity of a full notecard.

As things are now, WriteToNotecard would be fairly undoable.

However, you might consider .xml and an outside website for data storage?

Or, you can use one of the many hacks - changing an attribute of a prim to store the data you need. We did just get a WriteDescription function - a good amount of text can be stored there. The name's another. If you get creative, you can store data in Color or Size vectors.

Of course, all those hacks require a prim to alter, but, the data should be persistent, even across a sim crash that might reset variables in a normal script.
Nogard Codesmith
Second Life Resident
Join date: 24 Nov 2004
Posts: 191
01-29-2005 15:20
XML is great, but you have to initiate your communication from the remote server, and it really seems kludgy when implemented... Mind you, i've only messed with it a little bit, but man what a pain in the ass just to securly store some variables without having to worry about my script being reset. Storing info in prims is what i have resorted to, which seems less than elegant, but you gotta do what you gotta do.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
01-31-2005 12:42
About initiating communication from the server:
There are actually three different methods of implementing remote data storage.
You can either poll objects for requests to the server, (not recommended)
You can email out from SL to request XMLRPC polling from the server, which then polls until the object sends an email asking the server to stop.
Or you can go the pure email route.

There arent many nice interfaces out there for email RPC though, so you might be left in the dark as to exactly what you need to set it up. For email RPC I use the JavaMail api, and set it to periodically check an email account I set up purely for SL script emails.

==Chris