Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Passing Avatar Name Thru URL String

Growing Wise
Registered User
Join date: 26 Jan 2007
Posts: 3
01-30-2007 19:27
posted this to the wrong forum earlier ..... newbie question.. started mesing with SLS today ... simply wanting to pass the avatar name through the URL string ... am I even on the right track here?.... it doesn't ... wondering if Im even close?

default
{
touch_start(integer num_detected)
{
llRequestAgentData(llDetectedKey(0), DATA_NAME); // request creation date
}
dataserver(key queryid, string data)
{
llLoadURL(llDetectedKey(0), "My Site", "http://myServer/?avName="+ data);
}
}
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
01-30-2007 20:22
You don't need to invoke data_server, you can get an avatar's name with llDetectedName.

CODE

default
{
touch_start(integer start_param) {
key av = llDetectedKey(0);
string avName = llDetectedName(0);
llLoadURL(av, "My Site", "http://www.myserver.com/?avName="+avName);
}
}
Growing Wise
Registered User
Join date: 26 Jan 2007
Posts: 3
Worked great !
01-30-2007 20:34
Thanks !.. this worked perfect !
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
01-31-2007 09:52
It would probably be a good idea to URL-escape the data you pass to llHTTPRequest, using llEscapeURL().