Difference between revisions of "TotalControl for LSL/Events/BOT LIST GROUPS REPLY"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:BOT_LIST_GROUPS_REPLY}} <onlyinclude>Raised when Bot receives list of groups</onlyinclude> {{API Event Table}} {{API Variable Group|''event'' object properties...")
 
 
Line 17: Line 17:
 
         // Parse each group separated by a new line "\n"
 
         // Parse each group separated by a new line "\n"
 
         list groups = llParseString2List(str, ["\n"], []);
 
         list groups = llParseString2List(str, ["\n"], []);
 +
        integer count;
  
 
         // Parse each uuid name combo separated by a ";"
 
         // Parse each uuid name combo separated by a ";"
         for(integer count =0; count < llGetListLength(groups); count++) {
+
         for(count =0; count < llGetListLength(groups); count++) {
 
             list groupDetails= llParseString2List(llList2String(groups, count), [";"], []);
 
             list groupDetails= llParseString2List(llList2String(groups, count), [";"], []);
 
             llOwnerSay("UUID: " + llList2String(groupDetails, 0));
 
             llOwnerSay("UUID: " + llList2String(groupDetails, 0));

Latest revision as of 12:42, 4 March 2019

Raised when Bot receives list of groups

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
str List of groups in the format "uuid;name \n uuid;name...."
id ---

Example

link_message( integer sender_num, integer num, string str, key id ) {
    /////////////////// Bot list group reply event
    if(num==BOT_LIST_GROUPS_REPLY) {
        // Parse each group separated by a new line "\n"
        list groups = llParseString2List(str, ["\n"], []);
        integer count;

        // Parse each uuid name combo separated by a ";"
        for(count =0; count < llGetListLength(groups); count++) {
            list groupDetails= llParseString2List(llList2String(groups, count), [";"], []);
            llOwnerSay("UUID: " + llList2String(groupDetails, 0));
            llOwnerSay("Name: " + llList2String(groupDetails, 1));
        }
    }
}