Difference between revisions of "LlSetInventoryName"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 1: Line 1:
{{LSL Function/inventory|old}}{{LSL_Function
{{LSL_Function
|inject-2={{LSL Function/inventory|old}}
|mode=request
|mode=request
|func_id=???
|func_id=???

Latest revision as of 11:40, 19 June 2012

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llSetInventoryName( string old, string new );
REQUEST Function ID
0.0 Forced Delay
10.0 Energy

Tries to renames the inventory object old to new. Useful for vendors wishing to hand out customized versions of objects.

• string old an item in the inventory of the prim this script is in
• string new desired inventory name

Caveats

  • If old is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Deep Notes

Search JIRA for related Issues

Signature

//function void llSetInventoryName( string old, string new );

Comments

A few things that came to mind:

  • What happens with a name collision?
  • When used in a vendor it would be more useful to change the name of the item when giving, this would avoid the name collision problem (and having to change the name back after giving it).
  • A better name for this function would be llRenameInventory (for which there is at least one JIRA).

P.S. I changed the syntax, using inventory numbering to access items is hazardous, names are less prone to change. -- Strife (talk|contribs) 19:03, 21 March 2009 (UTC)

Possibly should use key, not names source. And it should work as copy/rename/give function. In case of collision - either add number to it's name or return error (should be a flag parameter). --Zidan Foxdale 14:00, 20 June 2010 (UTC)

Key support is a no-go. Multiple instances of an asset can exist in a prim's inventory. All those instances will all share the same key. -- Strife (talk|contribs) 23:52, 20 June 2010 (UTC)