Skip to content
lsl.devlsl.devLSL Dev

llLinksetDataDelete

function
Function syntax
integer llLinksetDataDelete(
  1. string name// Key name of the key-value pair to delete.
);
Returns
integer
Energy
10

The llLinksetDataDelete and llLinksetDataDeleteProtected functions erases a name:value pair from the linkset’s datastore.

When this function successfully removes a name:value pair a linkset_data event is triggered in all scripts running in the linkset with an action of LINKSETDATA_DELETE and the name parameter set to the name that was removed. The value parameter in the event is set to an empty string.

Removes an unprotected name:value pair from the linkset’s datastore. If the pair was created

Returns an integer success or failure code.

How to use
integer result = llLinksetDataDelete("");
ConstantDescription
LINKSETDATA_OK0The name:value pair was written to the datastore.
LINKSETDATA_EMEMORY1A name:value pair was too large to write to the linkset datastore.
LINKSETDATA_ENOKEY2The name supplied to llLinksetDataWrite was empty.
LINKSETDATA_EPROTECTED3The name:value pair has been protected from overwrite in the linkset’s datastore.
LINKSETDATA_NOTFOUND4The named key could not be found in the linkset’s datastore when attempting to delete it.
LINKSETDATA_NOUPDATE5The name:value stored in the linkset was not changed by the write operation because the value stored matches the value written.
  • If the name does not exist or the pass does not match, no event is triggered.
Example 1
70 collapsed lines
// Simple blacklist management.
integer gDialogChannel;
integer gDialogHandle;
integer gManagingBlocks;
startDialog(key person)
{
gManagingBlocks = 0;
gDialogHandle = llListen(gDialogChannel, "", person, "");
llDialog(person, "\nSelect action", ["List blocks", "Add block", "Remove block"], gDialogChannel);
llSetTimerEvent(60);
}
stopDialog()
{
llSetTimerEvent(0);
llListenRemove(gDialogHandle);
}
default
{
on_rez(integer sp)
{
llResetScript();
}
state_entry()
{
gDialogChannel = (integer)(llFrand(-10000000)-10000000);
llListen(PUBLIC_CHANNEL, "", NULL_KEY, "");;
}
timer()
{
stopDialog();
}
touch_start(integer nd)
{
key toucherKey = llDetectedKey(0);
if (toucherKey == llGetOwner())
{
startDialog(toucherKey);
}
}
listen(integer channel, string name, key id, string message)
{
if (llGetAgentSize(id) == ZERO_VECTOR)
{
return;
}
if (channel == gDialogChannel)
{
stopDialog();
if (gManagingBlocks)
{
message = llStringTrim(message, STRING_TRIM);
if ((key)message)
{
if (gManagingBlocks == 1)
{
llOwnerSay("Addition request has been sent to the blacklist storage");
llLinksetDataWrite("blocklist:" + message, "1");
}
else
{
llOwnerSay("Removal request has been sent to the blacklist storage.");
llLinksetDataDelete("blocklist:" + message);
}
}
56 collapsed lines
else
{
llOwnerSay("The UUID '" + message + "' appears to be invalid.");
}
startDialog(id);
}
else if (message == "List blocks")
{
list blocks = llLinksetDataFindKeys("^blocklist:", 0, 0);
integer listLength = llGetListLength(blocks);
llOwnerSay("Blacklist items: " + (string)listLength);
integer i;
while (i < listLength)
{
string record = llGetSubString(llList2String(blocks, i), 10, -1);
llOwnerSay("- secondlife:///app/agent/" + record + "/about" + " - " + record);
++i;
}
blocks = [];
startDialog(id);
}
else if (message == "Add block" || message == "Remove block")
{
string label = "add to";
gManagingBlocks = 1;
if (message == "Remove block")
{
gManagingBlocks = 2;
label = "remove from";
}
gDialogHandle = llListen(gDialogChannel, "", id, "");
llTextBox(id, "\nPlease specify one single avatar UUID you'd like to " + label + " the blacklist storage.", gDialogChannel);
llSetTimerEvent(60);
}
return;
}
if (llGetListLength(llLinksetDataFindKeys("blocklist:" + (string)id, 0, 1)) > 0)
{
llRegionSayTo(id, 0, "You're blacklisted.");
return;
}
llRegionSayTo(id, 0, "Hello there, secondlife:///app/agent/" + (string)id + "/about - your message: " + message);
}
linkset_data(integer action, string name, string value)
{
if (action == LINKSETDATA_RESET || action == LINKSETDATA_DELETE || action == LINKSETDATA_UPDATE)
{
llOwnerSay("Blacklist storage modified.");
}
}
}

The original wiki page documents these functions together with this one:

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.