Skip to content
lsl.devlsl.devLSL Dev

linkset_data

event
Event syntax
linkset_data(
  1. integer action,// An integer constant representing the action taken (e.g., LINKSETDATA_UPDATE, LINKSETDATA_DELETE, LINKSETDATA_RESET). Values: LinksetDataAction
  2. string name,// Key name of the modified key-value pair.
  3. string value// New string value of the pair (empty if the pair was deleted or is password-protected).
) { … }

This event fires in all scripts in a linkset whenever the datastore is changed.

The linkset_data event fires in all scripts in a linkset whenever the datastore has been modified through a call to one of the llLinksetData functions.

How to use
linkset_data(integer action, string name, string value)
{
}
ConstantDescription
LINKSETDATA_RESET0The linkset’s datastore has been cleared by a call to llLinksetDataReset.
LINKSETDATA_UPDATE1A key in the linkset’s datastore has been assigned a new value with llLinksetDataWrite
LINKSETDATA_DELETE2A key in the linkset’s datastore has been deleted. Either through a call to llLinksetDataDelete or llLinksetDataWrite with an empty value.
LINKSETDATA_MULTIDELETE3A comma separated list of the keys in the linkset’s datastore which have been deleted through a call to llLinksetDataDeleteFound.
Example 1
default
{
linkset_data(integer action, string name, string value)
{
if (action == LINKSETDATA_RESET)
{
llOwnerSay("Link set datastore has been cleared.");
// name and value will both be empty strings, ""
}
else if (action == LINKSETDATA_DELETE)
{
llOwnerSay("Link set datastore key \"" + name + "\" has been deleted.");
// value is an empty string, ""
}
else if (action == LINKSETDATA_UPDATE)
{
llOwnerSay("Link set datastore key \"" + name + "\" = \"" + value + "\".");
}
}
}
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.