Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting a name accurately.

Zante Zapedzki
We need html on a prim!
Join date: 15 Feb 2007
Posts: 123
04-14-2007 06:45
I'm having trouble with this line of code...

llInstantMessage(owner, llDetectedName(0) + " is ringing the bell!";);

The key (owner) is defined and I'm getting the message but all DetectedName(0) returns is...

00000000-0000-0000-0000-000000000000 is ringing the bell!

What have I overlooked? : (
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-14-2007 06:53
Where exactly are you using the code?


From: wikki
string llDetectedName(integer number)

Returns the name of detected object number (returns an empty string if number is not valid sensed object).

If the detected target has left the region or ceased to exist, this function will return the key of the object/agent instead of the name.

Note: The llDetected* functions will only return a meaningful value in the collision(), collision_start(), collision_end(), sensor(), touch(), touch_start(), or touch_end() events.
Zante Zapedzki
We need html on a prim!
Join date: 15 Feb 2007
Posts: 123
04-14-2007 07:43
Sorry, you're right.


It wasn't in one of those events.

To fix it I assigned it to another variable earlier on in the code.

name = llDetectedName(0);

then changed it to...

llInstantMessage(owner, name + " is ringing the bell!";);


Thanks : ) I'll be more careful next time.