Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

key llReplaceNotecard( key uid , string body );

Kamikaze Kelly
Registered User
Join date: 6 Jul 2006
Posts: 3
07-15-2006 18:04
disclaimer

* note that I do not propose that scripts be able to 'create' notecards, but rather edit the text body of a specified notecard of the same owner as the script.


features:

* modify the body of a notecard with the specified key


uses:

* informing users of large amounts of data without spamming the chat channel

* changing the settings file (in a notecard) for scripts, much like llRemoteLoadScriptPin in that the script can update the scripting of an object. The difference being that this would require less security consiousness, as only the settings of a script are changed, not the fundemental nature of said script. In addition, this would not be limited to the simulator.

* create a logging mechanism for debugging purposes, instead of spamming the debug channel.

example:

CODE
key response;

default
{
touch_start( integer num )
{
response = llReplaceNotecard( "mynotes" , "touched " + (string)(num) + " times" );
}

dataserver(key id, string data)
{
if( id == response )
{
llOwnerSay( "notecard updated" );
}
}
}
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
07-15-2006 18:34
One problem:

As the way notecards currently work if a user edits a notecard it creates a new one on the asset server with a new UUID.
Kamikaze Kelly
Registered User
Join date: 6 Jul 2006
Posts: 3
No problem
07-15-2006 20:05
Thats easily fixed by the server returning the (new) key in the 'data' field:

CODE

dataserver(key id, string data)
{
if( id == response )
{
llOwnerSay( "new notecard key is" + data );
}
}


to convert back to a normal key, use casting:

CODE
key new_key = (key)(data);
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
07-19-2006 09:27
You don't understand. Linden Labs doesn't want scripts CAPABLE of CREATING (or modifying) ASSETS.
Pixelsage Guru
Registered User
Join date: 2 Sep 2006
Posts: 4
09-16-2006 00:22
Then they need to work around that problem so users have a way of storing info more easily than how it is now. Notecards seem like the easiest entity to modify, and if they don't want to do that, then they need to work around it. So far, the artificial methods of storing data (such as storing it in an object that emails the owner and resets its data every so many hours) is poor and inefficient.