Difference between revisions of "LlRequestClientData"

From Second Life Wiki
Jump to navigation Jump to search
m (Link in 'See also' amended)
m (Robot: <pre> -> <lsl>)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{LSL Header}}__NOTOC__
{{LSL_Function
<div id="box">
|func_id
{{#vardefine:p_id_desc|avatar [[UUID]]}}{{#vardefine:p_data_desc|DATA_* flag}}
|func_delay
== Function: [[key]] llRequestClientData([[key]] {{LSL Param|id}}, [[integer]] {{LSL Param|data}}); ==
|mode=request
<div style="padding: 0.5em;">
|func=llRequestClientData
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
|sort=RequestClientData
{|
|p1_type=key
{{LSL DefineRow|[[key]]|id|{{#var:p_id_desc}}}}
|p1_name=id
{{LSL DefineRow|[[integer]]|data|{{#var:p_data_desc}}}}
|p1_desc=avatar [[UUID]]
|}
|p2_type=integer
<br/>
|p2_name=data
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:
|p2_desc=DATA_* flag
|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 22: 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 48: 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#GetViewerVersion|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 );