Difference between revisions of "LlRequestClientData"

From Second Life Wiki
Jump to navigation Jump to search
(Edited according to LSL Function style *without* adding it to the active LSL Function List)
m (Robot: <pre> -> <lsl>)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL Header}}__NOTOC__
{{LSL_Function
<div id="box">
|func_id
{{#vardefine:p_id_desc|avatar [[UUID]]}}
|func_delay
{{#vardefine:p_data_desc|DATA_* flag}}
|mode=request
== Function: [[key]] llRequestClientData([[key]] {{LSL Param|id}}, [[integer]] {{LSL Param|data}}); ==
|func=llRequestClientData
<div style="padding: 0.5em;">
|sort=RequestClientData
Requests '''{{LSL Param|data}}''' about the client app of online agent '''{{LSL Param|id}}'''. When '''{{LSL Param|data}}''' is available the [[dataserver]] event will be raised
|p1_type=key
{|
|p1_name=id
{{LSL DefineRow|[[key]]|id|{{#var:p_id_desc}}}}
|p1_desc=avatar [[UUID]]
{{LSL DefineRow|[[integer]]|data|{{#var:p_data_desc}}}}
|p2_type=integer
|}
|p2_name=data
<br/>
|p2_desc=DATA_* flag
I'm wishing for a function that works like [[llRequestAgentData]] to tell me more of the environment in which my script is running. Something to answer questions like:
|func_desc=Requests '''{{LSL Param|data}}''' about the client app of online agent '''{{LSL Param|id}}'''. When '''{{LSL Param|data}}''' is available the [[dataserver]] event will be raised
|return_type=key
|return_text= that is used to identify the [[dataserver]] event when it is raised
 
|spec=I'm wishing for a function that works like [[llRequestAgentData]] to tell me more of the environment in which my script is running. Something to answer questions like:


Q: Is the client app current or obsolete?
Q: Is the client app current or obsolete?
Line 23: Line 27:
Someone more skilled in wiki-editing than I could adapt the llRequestAgentData spec better here. Below you can see I began this effort, but I got stuck as soon as the editing grew too deeply geeky.
Someone more skilled in wiki-editing than I could adapt the llRequestAgentData spec better here. Below you can see I began this effort, but I got stuck as soon as the editing grew too deeply geeky.
----
----
A: Here we are, entry now adapted. But '''don't''' use the [[Template:LSL_Function|LSL Function]] template for any description other than a real LSL function. The template '''automatically''' adds the entry to the LSL function list, where this wished function already was listed before being corrected by this change!
A: Here we go, entry now adapted. But '''only''' use the [[Template:LSL_Function|LSL Function]] template with parameter <nowiki> "|mode=request" </nowiki> for a function description on  [[:Category:LSL_WishList|WishList]]. Else the template '''automatically''' adds the entry to the LSL function index, where this requested function already was listed before being corrected by this change!
</div></div>
|caveats
----
|examples=<lsl>
<div id="box">
== Example ==
<div style="padding: 0.5em;">
<pre>
key owner_key;
key owner_key;
key client_name_query;
key client_name_query;
Line 49: Line 49:
     }
     }
}
}
</pre>
</lsl>
</div></div>
|helpers
<div id="box">
|related
== See Also ==
|also_header
<div style="padding: 0.5em">
|also_events
'''Articles'''
|also_functions
*Design Discussions: [[LSL_To_Client_Communication#GetOperatingSystem|Get Operating System]]
|also_articles=[[LSL_To_Client_Communication#GetOperatingSystem|Get Operating System]]
*Design Discussions: [[LSL_To_Client_Communication#GetOperatingSystem|Get Viewer Version ]]
[[LSL_To_Client_Communication#GetViewerVersion|Get Viewer Version]]
[[Category:Design Discussions]]
|also_footer
|notes
|cat1=Design_Discussions
|cat2=WishList
}}

Latest revision as of 19:04, 4 August 2009

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

Summary

Function: key llRequestClientData( key id, integer data );

Requests data about the client app of online agent id. When data is available the dataserver event will be raised
Returns a key that is used to identify the dataserver event when it is raised

• key id avatar UUID
• integer data DATA_* flag

Specification

I'm wishing for a function that works like llRequestAgentData to tell me more of the environment in which my script is running. Something to answer questions like:

Q: Is the client app current or obsolete?

Q: Is the client app running on Apple Mac OS X/ Linux/ Windows, what? (Like Unix uname answers.)

Q: Is the world around me the one true Second Life world, or is it some emulation like the binary code only LSL-Editor of Windows?

I need this function to clarify bug reports, not so much to make the script do anything different, though certainly creators could choose to make scripts distinguish platforms otherwise, e.g., to refuse to run except in the glory that is the Mac OS X user interface.

Someone more skilled in wiki-editing than I could adapt the llRequestAgentData spec better here. Below you can see I began this effort, but I got stuck as soon as the editing grew too deeply geeky.


A: Here we go, entry now adapted. But only use the LSL Function template with parameter "|mode=request" for a function description on WishList. Else the template automatically adds the entry to the LSL function index, where this requested function already was listed before being corrected by this change!

Examples

<lsl> key owner_key; key client_name_query; string client_name;

default {

   state_entry()
   {
       owner_key = llGetOwner();
       client_name_query = llRequestClientData(owner_key, DATA_CLIENT_NAME);
   }
   dataserver(key queryid, string data)
   {
       if (client_name_query == queryid) {
           client_name = data;
           llOwnerSay("Bugs you see may be due to: " + client_name);
       }
   }

}

</lsl>

Deep Notes

Signature

//function key llRequestClientData( key id, integer data );