Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Question about llGetInventoryCreator data preservation

Bid Messmer
Registered User
Join date: 13 May 2007
Posts: 13
09-07-2007 02:59
I am working on a project where people can leave pics and notecards in a box for others to pick up. and as long as they are in sim I can

noteName = llGetInventoryName(INVENTORY_NOTECARD, i);
notecreatorID = llGetInventoryCreator(noteName);
notecreatorName = llKey2Name(notecreatorID);

and have it display their name so others can see the author before they pick the note they wanna read....

but if they leave the sim, this no longer works

I am very new to how data storage works in lsl, understanding almost nothing about it.... I assume a list can be generated to connect inventory item creator UUID with a name it picked up when the item was dropped, but am at a loss as to how to get that new ID for new items only, and then how to store it so authors names can be listed with the notecards they left...
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
09-07-2007 03:30
Use

llRequestAgentData( notecreatorID, DATA_NAME );

instead of llKey2Name. This will be slightly slower, and not as direct, as it doesn't return the name, but rather as a return through dataserver, but it works regardless of whether the av is in the sim or not.
Bid Messmer
Registered User
Join date: 13 May 2007
Posts: 13
09-07-2007 05:30
I retract that previous statement, I didn't go to the dataserver end of it. works great :) thanks!
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
09-07-2007 05:42
The UUID returned by llRequestAgentData is a unique database query ID. You need to add a dataserver event handler, in which the requested name will be returned as its "data" parameter.

lslwiki.net/lslwiki/wakka.php?wakka=llrequestagentdata
lslwiki.net/lslwiki/wakka.php?wakka=dataserver