Difference between revisions of "LlRequestClientData"

From Second Life Wiki
Jump to navigation Jump to search
(See also: GetOperatingSystem GetViewerVersion etc. in LSL_To_Client_Communication)
m (Robot: <pre> -> <lsl>)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
See also: GetOperatingSystem GetViewerVersion etc. in [[LSL_To_Client_Communication]]
{{LSL_Function
 
|func_id
----
|func_delay
|mode=request
|func=llRequestClientData
|sort=RequestClientData
|p1_type=key
|p1_name=id
|p1_desc=avatar [[UUID]]
|p2_type=integer
|p2_name=data
|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


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:
|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 14: Line 26:


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.
 
----
{{#vardefine:p_data_desc|DATA_* flag}}{{LSL_Function
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!
|func_id=155|func_sleep=0.1|func_energy=10.0
|func=llRequestAgentData
|return_type=key
|p1_type=key|p1_name=id|p1_hover=avatar UUID|p1_desc=avatar {{HoverLink|UUID|Universally Unique Identifier}}
|p2_type=integer|p2_name=data
|func_footnote
|func_desc=Requests '''{{LSL Param|data}}''' about the client app of online agent '''id'''. When '''{{LSL Param|data}}''' is available the [[dataserver]] event will be raised
|return_text=that is used to identify the [[dataserver]] event when it is raise.
|spec
|caveats
|caveats
|constants={{{!}} {{Prettytable}}
|examples=<lsl>
{{!}}- {{Hl2}}
! colspan="2" {{!}} {{LSL Param|data}} Constant
! Type
! colspan="4" {{!}} Description
{{!}}-
{{Template:LSL_Constants/llRequestAgentData}}
{{!}}}
|examples=<pre>
key owner_key;
key owner_key;
key client_name_query;
key client_name_query;
Line 53: Line 48:
         }
         }
     }
     }
}//~~~~
}
</pre>
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetAgentInfo]]|}}
|related
{{LSL DefineRow||[[llRequestAgentData]]|}}
|also_header
|also_tests
|also_events
|also_events={{LSL DefineRow||[[dataserver]]|}}
|also_functions
|also_articles
|also_articles=[[LSL_To_Client_Communication#GetOperatingSystem|Get Operating System]]
[[LSL_To_Client_Communication#GetViewerVersion|Get Viewer Version]]
|also_footer
|notes
|notes
|deprecated
|cat1=Design_Discussions
|cat1=Dataserver
|cat2=WishList
|cat2
|cat3
|cat4
}}
}}

Latest revision as of 20: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

Search JIRA for related Issues

Signature

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