<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Skwiggs+Skytower</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Skwiggs+Skytower"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Skwiggs_Skytower"/>
	<updated>2026-06-28T02:50:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Dataserver&amp;diff=464853</id>
		<title>Dataserver</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Dataserver&amp;diff=464853"/>
		<updated>2009-08-18T14:28:47Z</updated>

		<summary type="html">&lt;p&gt;Skwiggs Skytower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-2596}}{{LSL_Event&lt;br /&gt;
|event_id=24|event_delay|event=dataserver&lt;br /&gt;
|p1_type=key|p1_name=queryid|p1_desc=matches the return of the requesting function&lt;br /&gt;
|p2_type=string|p2_name=data|p2_desc=the requested data (cast as a string as necessary).&lt;br /&gt;
|event_desc=Triggered when task receives asynchronous data&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|constants={{{!}} {{Prettytable|style=margin-top:0;}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Function&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}}Input&lt;br /&gt;
! Decode&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; {{!}} Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} colspan=&amp;quot;3&amp;quot; {{!}} [[llGetNotecardLine]]&lt;br /&gt;
{{!}} {{LSLG|string}}&lt;br /&gt;
{{!}} colspan=&amp;quot;4&amp;quot; {{!}} The line in the requested notecard, limited to 255 bytes.&amp;lt;br/&amp;gt;If [[EOF]] the line requested is past the end of the notecard.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} colspan=&amp;quot;3&amp;quot; {{!}} [[llGetNumberOfNotecardLines]]&lt;br /&gt;
{{!}} ([[integer]])&lt;br /&gt;
{{!}} colspan=&amp;quot;4&amp;quot; {{!}} The number of lines in the notecard requested.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;7&amp;quot; {{!}} [[llRequestAgentData]]&lt;br /&gt;
{{LSL Constants/llRequestAgentData}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;1&amp;quot; {{!}} [[llRequestInventoryData]]&lt;br /&gt;
{{LSL Constants/llRequestInventoryData}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;9&amp;quot; {{!}} [[llRequestSimulatorData]]&lt;br /&gt;
{{LSL Constants/llRequestedSimulatorData}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
|caveats=&lt;br /&gt;
*Dataserver answers do not necessarily come in the order they were requested.&lt;br /&gt;
**If there are multiple pending requests, always use the queryid key to determine which answer is being received.&lt;br /&gt;
*Dataserver requests will trigger &#039;&#039;&#039;dataserver&#039;&#039;&#039; events in all scripts within the same prim where the request was made.&lt;br /&gt;
**If there are multiple scripts with &#039;&#039;&#039;dataserver&#039;&#039;&#039; events in the same prim, always use the queryid key to determine which answer is being received.&lt;br /&gt;
**&#039;&#039;&#039;dataserver&#039;&#039;&#039; events will not be triggered in scripts contained in other prims in the same linked object.&lt;br /&gt;
*If more data is requested using the same query_id before the &#039;&#039;&#039;dataserver&#039;&#039;&#039; event dealing with that query_id has resolved the data will be trashed. To avoid the trashing do not ask [[if]](query_key == query_id). Though (see above caveats) this has its own drawbacks.&lt;br /&gt;
|notes=*Requesting a dataserver event from within a dataserver event is a very valid use of this function.  Be aware not to make your own loop inside the event.  It will lock the event open till the loop is finished then send all the requests made, from within, with the data from the first retrieval.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;key kQuery;&lt;br /&gt;
integer iLine = 0;&lt;br /&gt;
default {&lt;br /&gt;
    &lt;br /&gt;
    state_entry() {&lt;br /&gt;
        llSay(0, &amp;quot;Reading notecard...&amp;quot;);&lt;br /&gt;
        kQuery = llGetNotecardLine(&amp;quot;My Notecard&amp;quot;, iLine);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    dataserver(key query_id, string data) {&lt;br /&gt;
&lt;br /&gt;
        if (query_id == kQuery) {&lt;br /&gt;
            // this is a line of our notecard&lt;br /&gt;
            if (data == EOF) {    &lt;br /&gt;
&lt;br /&gt;
                llSay(0, &amp;quot;No more lines in notecard, read &amp;quot; + (string)iLine + &amp;quot; lines.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            } else {&lt;br /&gt;
&lt;br /&gt;
                // increment line count&lt;br /&gt;
                llSay(0, &amp;quot;Line &amp;quot; + (string)iLine + &amp;quot;: &amp;quot; + data);&lt;br /&gt;
                &lt;br /&gt;
                //request next line&lt;br /&gt;
                ++iLine;&lt;br /&gt;
                kQuery = llGetNotecardLine(&amp;quot;My Notecard&amp;quot;, iLine);&lt;br /&gt;
&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|mode&lt;br /&gt;
|deprecated&lt;br /&gt;
|cat1=Dataserver&lt;br /&gt;
|cat2=Notecard&lt;br /&gt;
|cat3=Inventory&lt;br /&gt;
|cat4=Region&lt;br /&gt;
|cat5=Script&lt;br /&gt;
|cat6=Prim&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Skwiggs Skytower</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Dataserver&amp;diff=464753</id>
		<title>Dataserver</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Dataserver&amp;diff=464753"/>
		<updated>2009-08-18T13:57:28Z</updated>

		<summary type="html">&lt;p&gt;Skwiggs Skytower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-2596}}{{LSL_Event&lt;br /&gt;
|event_id=24|event_delay|event=dataserver&lt;br /&gt;
|p1_type=key|p1_name=queryid|p1_desc=matches the return of the requesting function&lt;br /&gt;
|p2_type=string|p2_name=data|p2_desc=the requested data (cast as a string as necessary).&lt;br /&gt;
|event_desc=Triggered when task receives asynchronous data&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|constants={{{!}} {{Prettytable|style=margin-top:0;}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Function&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; {{!}}Input&lt;br /&gt;
! Decode&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; {{!}} Description&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} colspan=&amp;quot;3&amp;quot; {{!}} [[llGetNotecardLine]]&lt;br /&gt;
{{!}} {{LSLG|string}}&lt;br /&gt;
{{!}} colspan=&amp;quot;4&amp;quot; {{!}} The line in the requested notecard, limited to 255 bytes.&amp;lt;br/&amp;gt;If [[EOF]] the line requested is past the end of the notecard.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} colspan=&amp;quot;3&amp;quot; {{!}} [[llGetNumberOfNotecardLines]]&lt;br /&gt;
{{!}} ([[integer]])&lt;br /&gt;
{{!}} colspan=&amp;quot;4&amp;quot; {{!}} The number of lines in the notecard requested.&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;7&amp;quot; {{!}} [[llRequestAgentData]]&lt;br /&gt;
{{LSL Constants/llRequestAgentData}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;1&amp;quot; {{!}} [[llRequestInventoryData]]&lt;br /&gt;
{{LSL Constants/llRequestInventoryData}}&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} rowspan=&amp;quot;9&amp;quot; {{!}} [[llRequestSimulatorData]]&lt;br /&gt;
{{LSL Constants/llRequestedSimulatorData}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
|caveats=&lt;br /&gt;
*Dataserver answers do not necessarily come in the order they were requested.&lt;br /&gt;
**If there are multiple pending requests, always use the queryid key to determine which answer is being received.&lt;br /&gt;
*Dataserver requests will trigger &#039;&#039;&#039;dataserver&#039;&#039;&#039; events in all scripts within the same prim where the request was made.&lt;br /&gt;
**If there are multiple scripts with &#039;&#039;&#039;dataserver&#039;&#039;&#039; events in the same prim, always use the queryid key to determine which answer is being received.&lt;br /&gt;
**&#039;&#039;&#039;dataserver&#039;&#039;&#039; events will not be triggered in scripts contained in other prims in the same linked object.&lt;br /&gt;
*If more data is requested using the same query_id before the &#039;&#039;&#039;dataserver&#039;&#039;&#039; event dealing with that query_id has resolved the data will be trashed. To avoid the trashing do not ask [[if]](query_key == query_id). Though (see above caveats) this has its own drawbacks.&lt;br /&gt;
*Requesting a dataserver event from within a dataserver event is a very valid use of this function.  Be aware not to make your own loop inside the event.  It will lock the event open till the loop is finished then send all the requests made, from within, with the data from the first retrieval.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;key kQuery;&lt;br /&gt;
integer iLine = 0;&lt;br /&gt;
default {&lt;br /&gt;
    &lt;br /&gt;
    state_entry() {&lt;br /&gt;
        llSay(0, &amp;quot;Reading notecard...&amp;quot;);&lt;br /&gt;
        kQuery = llGetNotecardLine(&amp;quot;My Notecard&amp;quot;, iLine);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    dataserver(key query_id, string data) {&lt;br /&gt;
&lt;br /&gt;
        if (query_id == kQuery) {&lt;br /&gt;
            // this is a line of our notecard&lt;br /&gt;
            if (data == EOF) {    &lt;br /&gt;
&lt;br /&gt;
                llSay(0, &amp;quot;No more lines in notecard, read &amp;quot; + (string)iLine + &amp;quot; lines.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            } else {&lt;br /&gt;
&lt;br /&gt;
                // increment line count&lt;br /&gt;
                llSay(0, &amp;quot;Line &amp;quot; + (string)iLine + &amp;quot;: &amp;quot; + data);&lt;br /&gt;
                &lt;br /&gt;
                //request next line&lt;br /&gt;
                ++iLine;&lt;br /&gt;
                kQuery = llGetNotecardLine(&amp;quot;My Notecard&amp;quot;, iLine);&lt;br /&gt;
&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|mode&lt;br /&gt;
|deprecated&lt;br /&gt;
|cat1=Dataserver&lt;br /&gt;
|cat2=Notecard&lt;br /&gt;
|cat3=Inventory&lt;br /&gt;
|cat4=Region&lt;br /&gt;
|cat5=Script&lt;br /&gt;
|cat6=Prim&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Skwiggs Skytower</name></author>
	</entry>
</feed>