Difference between revisions of "LlSetObjectName"

From Second Life Wiki
Jump to navigation Jump to search
(grow example to "$yyyy-$mm-$dd $Object" from "Object X")
(gather the caveats together, add the Chat History specific, add the Edit General Name caveat)
Line 7: Line 7:
|p1_name=name
|p1_name=name
|func_desc=Sets the prim's name according to the '''name''' parameter.
|func_desc=Sets the prim's name according to the '''name''' parameter.
|func_footnote=Limited to 63 bytes by the client
|func_footnote=
|return_text
|return_text
|spec
|spec
|caveats=*The prim name is limited to 255 bytes, any string longer then that will be truncated. This truncation does not always happen when the attribute is set or read.
|caveats=
#The LL server did not reliably store more than 255 bytes of prim name. Longer prim names appeared cut short, sometimes much later than the first few calls of llSetObjectName and [[llGetObjectName]].
#The LL client did not reliably edit more than 63 bytes. Longer prim names appeared cut short, ''e.g.'', as the name of the prim speaking in the Chat History of [[llOwnerSay]] messages.
#The LL client did not reliably show the current name. Misleadingly old names sometimes appeared at Edit > General > Name until you closed and reopened the Edit dialog of the prim.
|constants
|constants
|examples=<pre>
|examples=<pre>

Revision as of 04:54, 16 October 2007

Summary

Function: llSetObjectName( string name );

Sets the prim's name according to the name parameter.

• string name

Caveats

  1. The LL server did not reliably store more than 255 bytes of prim name. Longer prim names appeared cut short, sometimes much later than the first few calls of llSetObjectName and llGetObjectName.
  2. The LL client did not reliably edit more than 63 bytes. Longer prim names appeared cut short, e.g., as the name of the prim speaking in the Chat History of llOwnerSay messages.
  3. The LL client did not reliably show the current name. Misleadingly old names sometimes appeared at Edit > General > Name until you closed and reopened the Edit dialog of the prim.
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        string yyyy1mm1dd = llGetDate();
        string name = yyyy1mm1dd + " " + llGetObjectName();
        llOwnerSay("llSetObjectName(\"" + name + "\")");
        llSetObjectName(name);
    }
}

See Also

Functions

•  llGetObjectName Get the prims name
•  llGetLinkName Get a linked prims name
•  llGetObjectDesc Get the prims description
•  llSetObjectDesc Set the prims description

Deep Notes

Search JIRA for related Issues

Signature

function void llSetObjectName( string name );