Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem Getting Prim's Group Name

Cyd Woolley
Carpe Cerevisiam
Join date: 6 Jan 2007
Posts: 21
02-15-2008 09:05
In a prim I created, I have a script with the following code:

list details = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]);
string name = llKey2Name(llList2Key(details, 0));
llOwnerSay("["+name+"]";);

The llGetObjectDetails call returns a one-element list containing the prim's group key. The key appears to be a valid key, but passing it to llKey2Name() always returns an empty string (i. e., the llOwnerSay always outputs []). I have verified that the prim DOES have a valid group set for it. This is a regular single prim. It is not part of a linkset. It is not an attachment.

Anyone know why this is not working? Thanks!!
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
02-15-2008 09:11
llKey2Name won't return the name of a Group.
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
02-15-2008 09:16
there is a work around posted here some where, using an http call to the SL web server with the group key and then fetch the group name from the web page
_____________________
Cyd Woolley
Carpe Cerevisiam
Join date: 6 Jan 2007
Posts: 21
02-15-2008 09:18
Oh. Wonderful. That should probably be documented in the wiki entry for llKey2Name(). I wonder if that is intentional, or an LSL oversight/bug. I suppose there's no way to get the name of the group set for a prim. (Other than reaching out to an external source.) Thanks for the replies.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-15-2008 14:05
actually it is documented, specifically returns names for avatars/agents and prims that are in the sim.

it would seem semi intentional, since th function is requesting sim data, and sims don't store much in the way of group data.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -