Difference between revisions of "LlLinksetDataWrite"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 2: Line 2:
|func_sleep=0.0|func_energy=10.0
|func_sleep=0.0|func_energy=10.0
|func=llLinksetDataWrite
|func=llLinksetDataWrite
|p1_type=string|p1_name=name|p1_desc=The name of the link set data key to be updated or created.
|p1_type=string|p1_name=key|p1_desc=The '''key''' of the '''key:value''' pair in the datastore to be updated or created.
|p2_type=string|p2_name=value|p2_desc=The value to assign to the named key
|p2_type=string|p2_name=value|p2_desc=The '''value''' of the '''key:value''' pair.
|return_type=integer
|return_type=integer
|return_text=success or failure code.
|return_text=success or failure code.
|func_footnote
|func_footnote
|func_desc=The llLinksetDataWrite function creates or updates a key in the link set datastore, assigning it the string specified in the value parameter. If the value parameter is an empty string, the key is deleted.  
|func_desc=The llLinksetDataWrite function creates or updates the '''key:value''' pair in the linkset datastore. If {{LSLP|value}} is an empty string, the pair is deleted.  


This function returns 0 on success or an error code on failure.
This function returns 0 on success or an error code on failure.


When this function is called the [[linkset_data]] event is triggered in all scripts running in the link set with an action of [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_UPDATE]], or [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_DELETE]] if the key value pair is deleted.
When this function is called the [[linkset_data]] event is triggered in all scripts running in the linkset with an action of [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_UPDATE]], or [[Template:LSL_Constants_Linkset_Data|LINKSETDATA_DELETE]] if the pair is deleted.
|func_footnote
|func_footnote
|spec=
|spec=
The linkset datastore can contain up to 64k of data.  Every key-value pair written to the datastore consumes a number of bytes in the datastore equal to the length of its key plus the length of the value.
The linkset datastore can contain up to 64k of data.  Every pair written to the datastore consumes a number of bytes in the datastore equal to the length of {{LSLP|key}} plus the length of {{LSLP|value}}.
|caveats
|caveats
|helpers
|helpers

Revision as of 16:23, 13 October 2022

Summary

Function: integer llLinksetDataWrite( string key, string value );

The llLinksetDataWrite function creates or updates the key:value pair in the linkset datastore. If value is an empty string, the pair is deleted.

This function returns 0 on success or an error code on failure.

When this function is called the linkset_data event is triggered in all scripts running in the linkset with an action of LINKSETDATA_UPDATE, or LINKSETDATA_DELETE if the pair is deleted.
Returns an integer success or failure code.

• string key The key of the key:value pair in the datastore to be updated or created.
• string value The value of the key:value pair.

Specification

The linkset datastore can contain up to 64k of data. Every pair written to the datastore consumes a number of bytes in the datastore equal to the length of key plus the length of value.

Examples

Deep Notes

Search JIRA for related Issues

Signature

function integer llLinksetDataWrite( string key, string value );