Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Keeping Info Permanently?

Cutter Rubio
Hopeless Romantic
Join date: 7 Feb 2004
Posts: 264
09-09-2004 15:16
I took a quick, brief pass through the WIKI and I have to ask, in the hopes that I missed it...

Is there no way for LSL to write data TO a Notecard? I see I can read it all I want but I didn't see any obvious function to write to it. Please tell me I'm wrong :D

Thanks!
_____________________
The early bird may get the worm, but the second mouse gets the cheese.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
09-09-2004 15:44
Correct.

Not YET.

It has been confirmed that LL is working on llCreateNotecard() which will let us create notecards, obviously. We still won't be able to edit existing ones, but that's due to a serious problem with editing notecards and the database.

In the mean time, people are going to tell you to use the Description field of the object. I think that's an ugly, disqusting hack, and hope to never actually see it in world.
_____________________
</sarcasm>
Cutter Rubio
Hopeless Romantic
Join date: 7 Feb 2004
Posts: 264
Ugh
09-09-2004 16:32
OK, Thanks Molecular. I was hoping to do a Guestbook for my home where it would automatically enter the name of an AV who clicked it, but guess that's not do-able. Seems a pretty basic need = long term data storage. Surprised they don't have it.

Oh well... one less thing to do :)
_____________________
The early bird may get the worm, but the second mouse gets the cheese.
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
09-09-2004 16:41
From: someone
Originally posted by Moleculor Satyr
In the mean time, people are going to tell you to use the Description field of the object. I think that's an ugly, disqusting hack, and hope to never actually see it in world.


It just became my number 1 priority. ;)
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Jeff Otis
Registered User
Join date: 23 Aug 2004
Posts: 13
09-09-2004 18:24
You could probably use XML-RPC and/or email with alot of custom off site scriptiing to do it.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
09-10-2004 00:42
store it in the prim settings; use a tube, they have the same number of texture faces as box's with more float attributes.
_____________________
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
Trent Hedges
TrentCycle & GRAPHICA
Join date: 4 Sep 2003
Posts: 198
09-13-2004 05:09
From: someone
Originally posted by Strife Onizuka
store it in the prim settings; use a tube, they have the same number of texture faces as box's with more float attributes.


I am looking for a way to permanently store a whack of data also - can you elaborate on this a bit? how much can it hold? How is it accomplished? Sorry if this is a complex answer :(

many thanks in advance if you can tell me!
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-13-2004 06:25
Quit your hacking and just use off-site storage, accessible through RPC. Or set up a distributed database with dedicated storage scripts... in principle, separating storage from algorithms means that you can recompile the main logic script and keep your stored data intact.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
09-13-2004 06:32
The day my connection becomes guaranteed perfect and always on, and there's a Perl RPC tutorial will be the day I start using RPC.
_____________________
</sarcasm>
Trent Hedges
TrentCycle & GRAPHICA
Join date: 4 Sep 2003
Posts: 198
09-13-2004 06:41
couldn't agree more molecular...

I have yet to find a decent tutoril on how to use RPC. I understand a large majority of the functions available in LSL and I have scripted a whack of working stuff, but I am not knowledgeable with regard to RPC.

i have yet to find anything that adequately describes how to set up and use this functionality.

Furthermore - the usage I am describing is a product that i want to sell to other users, which i dont want to support for them - so it has to be independant to SL so that I am not on the hook for supporting it.

Hack or not - if the possibility exists, it exists. Until I get LLWriteNotecard() then I'll take what I can get

so I am still asking someone to elaborate on this rather than tell me to be quiet -

thanks in advance to someone with help rather than commentary

ps. sorry if that's harsh eggy - nothing personal - just frustration -
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
09-13-2004 06:53
Use email, find a unix-like box, and research /etc/mail/aliases.

A line like:

user: "|/home/emailactions/test.pl"

Will, forward every email to 'user@yourdomain' to /home/emailactions/test.pl via STDIN. Anything reported back from the program via STDOUT, will be piped back into sendmail and returned to the user that sent the message.

It is aeons faster to implement & work with than XMLRPC, and there is no comparable 'lag' associated with emails, and as a bonus you can send more data at once (XMLRPC is limited to 255chars for it's string, Email is limited to 4096chars).

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
09-13-2004 12:40
What about this as a temporary solution:

Use a kind of "Answering Machine" type solution, and you edit a notecard and copy paste the messages into the notecard?

Oh... here is the code for the answering machine:

. start code

// This script keeps a list of messages.
// The owner can play the messages back and erase them.

// Global variables
list message_list;
integer listen_id = -1; // Lets us turn off listening when we need to
string current_speaker_name = ""; // Who is currently recording a message

readList()
{
integer i;
integer count = llGetListLength( message_list );
llSay( 0, "You have " + (string) count + " messages:" );
for( i = 0; i < count; i++ )
{
llSay( 0, (string)(i+1) + ": " + llList2String(message_list, i) );
}
}

resetList()
{
message_list = llDeleteSubList(message_list, 0, llGetListLength(message_list));
llSay( 0, "Erased all messages.";);
}

addMessage( string name, string message )
{
string full_message = name + " said, '" + message + "'";
message_list += full_message;
}

default
{
on_rez( integer start_param )
{
// re-initialize
message_list = llDeleteSubList(message_list, 0, llGetListLength(message_list));
listen_id = -1;
current_speaker_name = "";
}

// Listen to a single line, spoken by the person who pressed
// the "Leave Message" button.
listen( integer channel, string name, key id, string message )
{
if( (channel == 0) && (current_speaker_name == name ) )
{
addMessage( current_speaker_name, message );
llListenRemove( listen_id );
current_speaker_name = "";
listen_id = -1;
llSay(0, "Message recorded: " + message );
}
}

// Process messages from buttons
link_message(integer sender_num, integer num, string message, key id)
{
// Uses a standard button message format:
// "Button Message, <button name>, key=<user key>, <user name>"

// Convert comma-separated-values into a list
list msg_list = llCSV2List( message );
if( llList2String( msg_list, 0) == "Button Message" )
{
string sender_name = llList2String( msg_list, 1);
key user_key = llList2Key( msg_list, 2);
string user_name = llList2String( msg_list, 3);

if( sender_name == "leave_message_btn" )
{
current_speaker_name = user_name;
if( listen_id != -1 )
{
llListenRemove( listen_id );
}
listen_id = llListen( 0, user_name, "", "" );
llSay(0, "Leave a one-line message after the beep...BEEP!" );
}
else
if( sender_name == "play_messages_btn" )
{
if( user_key == llGetOwner() )
{
readList();
}
}
else
if( sender_name == "erase_messages_btn" )
{
if( user_key == llGetOwner() )
{
resetList();
}
}
}
}
}

. end code

You can maybe modify that a little and turn it into something more to your liking. Also note, that this is not MY code, but I found it in SL and it was not copywrited or protected from anyone in any way... I hope it helps. :rolleyes:
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts