Linkset data

From Second Life Wiki
Revision as of 10:43, 13 October 2022 by Rider Linden (talk | contribs) (Created page with "{{LSL_Event|event_id= |inject-2= |event_delay |event=linkset_data |p1_type=integer|p1_name=action|p1_desc=Action taken on the link set Datastore |p2_type=string|p2_name=name|p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

Event: linkset_data( integer action, string name, string value ){ ; }

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

• integer action Action taken on the link set Datastore
• string name The name of the link set datastore key that was modified.
• string value The new value of the link set datastore key. Empty string if the key was deleted.

This event fires in all scripts in a link set whenever the link set data is changed.

Constant Description
LINKSETDATA_RESET 0 The linkset's datastore has been cleared by a call to llLinksetDataReset.
LINKSETDATA_UPDATE 1 A key in the linkset's datastore has been assigned a new value with llLinksetDataWrite
LINKSETDATA_DELETE 2 A key in the linkset's datastore has been deleted. Either through a call to llLinksetDataDelete or llLinksetDataWrite with an empty value.
LINKSETDATA_MULTIDELETE 3 A comma separated list of the keys in the linkset's datastore which have been deleted through a call to llLinksetDataDeleteFound.

Examples

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 "\".");
        }
    }
}

Deep Notes

Signature

event void linkset_data( integer action, string name, string value );