Difference between revisions of "Notecard Configuration Reader by Maddox Deluxe"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
 
(107 intermediate revisions by one other user not shown)
Line 1: Line 1:
== This new update has been tested and works great ==
Read the script comments to have better understanding of the codes. [[http://youtu.be/f9hRGWNW7a4 v1.6 Video]]
{{ColorPanel
|background=#cdd
|bordercolor=#000
|Fixes in v1.6|
* Backdrop uuid now checks for NULL KEY
* Checks the notecard for saved data
* Clean up the script
}}
{{ColorPanel
{{ColorPanel
|background=#cdd
|background=#cdd
|bordercolor=#000
|bordercolor=#000
|First make a note card called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop.|
|Fixes in v1.5|
* New uuid Key checking function
}}  
}}  
{{ColorPanel
|background=#cdd
|bordercolor=#000
|Fixes in v1.4|
* Themes list format adding
}}
{{ColorPanel
|background=#cdd
|bordercolor=#000
|Fixes in v1.3|
* Empty notecard data error checking
* Spaces error checking
* Add few more comments to some codes
}}
{{ColorPanel
|background=#cdd
|bordercolor=#000
|Fixes in v1.2|
* Key names error checking
* Other fixes that are not listed
}}
{{ColorPanel
|background=#cdd
|bordercolor=#000
|Useful Functions - (See main script comments)|
* DumpListFind(list db, string name)
* integer IsElement(list db, string search)
* integer KeyNameCheck(list db, string search)
* integer isKey(key uuid)
}}
First make a notecard called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop, but holds the key format still for error checking. The notecard format can not have line spaces and need to be done just how you see the notecard settings here, the error checking works great for the script.
<pre>
<pre>
// our test notecard
// our test notecard
Line 20: Line 65:
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
</pre>
</pre>
{{ColorPanel
Or with out the comments.
|background=#cdd
|bordercolor=#000
|Faster for loading|
}}
<pre>
<pre>
[Author Name] = Maddox Deluxe
[Author Name] = Maddox Deluxe
Line 37: Line 78:
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
</pre>
</pre>
{{ColorPanel
Our main script called (CODE).Notecard.Reader
|background=#cdd
<source lang="lsl2">
|bordercolor=#000
// Notecard Multi-line Entries Configuration Reader v1.6 by Maddox Deluxe
|Our main script called (CODE).Notecard.Reader|
// Error Checking for: Key Names, values, Empty Notecard Data, Line Spaces
}}
<lsl>
// Notecard Multi-line Entries Configuration Reader v1.1 by Maddox Deluxe
// This script is free; you can redistribute it and/or modify it
// This script is free; you can redistribute it and/or modify it
// Just read the comments on the script
// Just read the comments on the script
Line 57: Line 95:
string Floor_Drop_UUID = "";  // variable for setting floor drop uuid key to the themes list
string Floor_Drop_UUID = "";  // variable for setting floor drop uuid key to the themes list


string data;                  // note card data
string data;                  // notecard data
string GetNoteName;          // incoming note card name  
string GetNoteName;          // notecard name  
   
   
list Themes;                  // our list database for testing
list Themes;                  // our list database for testing
list KeyNames;                // our list database for the key names: [Author Name]. [Menu Button Name], ect..
   
   
integer ThemesCount;          // counts how many themes they are in the note card configuration
integer ThemesCount;          // counts how many themes they are in the notecard configuration
   
   
key User;                    // user tracker key
key User;                    // user tracker key
Line 84: Line 123:
   
   
   //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
   //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
             if(FD != "00000000-0000-0000-0000-000000000000")
             if(FD != (key)"00000000-0000-0000-0000-000000000000")
             {
             {
  //    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
  //    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
Line 106: Line 145:
         return FALSE; // was not found
         return FALSE; // was not found
  }
  }
// Checks the uuid keys in the notecard, making sure they are real keys
// function by Maddox Deluxe
integer isKey(key check)  
// checks the key names making sure they match what is setup in the notecard  
integer KeyNameCheck(list db, string search)
{
{
    if (llStringLength(check) != 36)
        return FALSE;
    // Hyphenation test:
    if  (    (llGetSubString(check, 8, 8) != "-")
          ||  (llGetSubString(check, 13, 13) != "-")
          ||  (llGetSubString(check, 18, 18) != "-")
          ||  (llGetSubString(check, 23, 23) != "-"))
            return FALSE;
    // Remove dashes
    check = llDeleteSubString(llDeleteSubString(llDeleteSubString(llDeleteSubString((string)check, 8, 8), 12, 12), 16, 16), 20, 20);
    // Hex test
     integer i;
     integer i;
     for (i = 0; i < 32; i+=4)  
     for (i=0;i<llGetListLength(db);++i)
     {
     {
         string char = llGetSubString(check, i, i+3 );
         string s = llList2String(db,i);
         if ((integer)("0x"+char) == 0 && char != "0000")  
         if (s==search) return TRUE;
            return FALSE;
     }
     }
     return TRUE; // Passed all tests
     return FALSE;
}
}
// Checks the uuid keys in the notecard, making sure they are real keys
// 2 valid key, not NULL_KEY
// 1 (TRUE):  NULL_KEY
// 0 (FALSE): not a key
// https://wiki.secondlife.com/wiki/Category:LSL_Key
integer isKey(key uuid)
{
    if (uuid)
        return 2;
    return (uuid == NULL_KEY);
}
// notecard initialization
// notecard initialization
NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage
NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage
{
{
  if(llGetInventoryType(GrabNoteCardName) != INVENTORY_NOTECARD)
if (llGetInventoryKey(GrabNoteCardName) == NULL_KEY) // update v1.6 with notecard null key checking
    {
  {
  llInstantMessage(id,"Theme note card was not found "+(string)GrabNoteCardName+".");
llInstantMessage(id,"Notecard '" +GrabNoteCardName+ "' (1) The notecard key is null, write some data in it and hit save. (2) Notecard was not found.");
   return;   
   return;   
     }
     }
     LineRequestID = llGetNumberOfNotecardLines(GetNoteName); // total number of lines in the notecard
    else
     LineRequestID = llGetNumberOfNotecardLines(GrabNoteCardName); // total number of lines in the notecard
     Themes = [];      // clear the themes list
     Themes = [];      // clear the themes list
     LineIndex = 0;    // start reading from line 0
     LineIndex = 0;    // start reading from line 0
     ThemesCount = 0;  // start adding from 0
     ThemesCount = 0;  // start adding from 0
     NotecardQueryId = llGetNotecardLine(GetNoteName, LineIndex); // read from the first line in the notecard
     NotecardQueryId = llGetNotecardLine(GrabNoteCardName, LineIndex);
     llInstantMessage(id,"Please stand by, reading themes configuration for " +GetNoteName);
    KeyNames = [];    // clear the keynames list
                      // setup our key names
    KeyNames = ["[author name]","[menu button name]","[backdrop texture uuid]","[floordrop texture uuid]"];
     llInstantMessage(id,"Please stand by, reading themes configuration for " +GrabNoteCardName);
    GetNoteName = GrabNoteCardName;
}
}
 
ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage
ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage
{
{
Line 153: Line 196:
string cmd_grab;
string cmd_grab;
string value;
string value;
ThemesCount;
   
   
//  if we are at the end of the file
//  if we are at the end of the file
    if(data == EOF)
  if(data == EOF)
     {
     {
         llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
         llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
       
         // lets use the 2nd search string for this test, the search strings are the button names in the notecard configuration
         // lets use the 2nd search string for this test, the search strings are the button names in the notecard configuration
         if(IsElement(Themes,"Fantasy Car")==TRUE)
        string TestSearch = "Fantasy Car";
         if(IsElement(Themes,TestSearch)==FALSE)
         {
         {
           DumpListFind(Themes,"Fantasy Car");
        llInstantMessage(id,"Themes Configuration Error. Button search string was not found.");
        return;
          }
        else
           DumpListFind(Themes,TestSearch);
           return;
           return;
         }
         }
         else
         if(data == "")
         return;
         {
        llInstantMessage(id,"Themes Configuration Format Error. (1) No DATA found. (2) Got line spaces.");
        llResetScript();
         }
         }
         if(data != "")
         if(data != "")
Line 175: Line 224:
              
              
             // cut off any leading blanks
             // cut off any leading blanks
             // ignore blank or comment lines
             // ignore comment lines
            // if you change the comment line from // to #, make sure you change the 1 to 0
             if (llGetSubString(data, 0, 1) != "//" && llStringTrim(data, STRING_TRIM) != "" )
             if (llGetSubString(data, 0, 1) != "//" && llStringTrim(data, STRING_TRIM) != "" )
             {
             {
Line 181: Line 231:
             cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
             cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
             value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
             value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
   
           
             if(cmd_grab == "[author name]")
            // we only need this at the start to check for key name errors :)
             if(KeyNameCheck(KeyNames,cmd_grab)==FALSE)
             {
             {
            llInstantMessage(id,"Themes Configuration Format Error on line: " +(string)LineIndex+ ".");
            llResetScript();
            }
            if(cmd_grab == "[author name]")
            {
             Author_Name = value;
             Author_Name = value;
             // error checking for Author Name
             // error checking for Author Name
             if(value == "")
             if(value == "")
            {
            {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Author Name can not be empty.");
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Author Name can not be empty.");
             return;
             llResetScript();
             }
             }
           }
           }
Line 200: Line 256:
             {
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Menu Button Name can not be empty.");
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Menu Button Name can not be empty.");
             return;
             llResetScript();
             }
             }
             }
             }
Line 208: Line 264:
             Back_Drop_UUID = value;
             Back_Drop_UUID = value;
             // error checking for BackDrop Texture UUID
             // error checking for BackDrop Texture UUID
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
             if(value == "" || (isKey((key)value)) == 1 || (isKey((key)value)) == 0)
             {
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Backdrop Texture UUID is empty. (2) The Backdrop UUID is not a key.");
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Backdrop UUID Key is empty. (2) The Backdrop UUID is not a key. (3) The Backdrop UUID Key is NULL.");
             return;
             llResetScript();
            }
            }
          }
          }
            else
          else
            if(cmd_grab == "[floordrop texture uuid]")
          if(cmd_grab == "[floordrop texture uuid]")
             {
             {
             Floor_Drop_UUID = value;
             Floor_Drop_UUID = value;
             // error checking for FloorDrop Texture UUID
             // error checking for FloorDrop Texture UUID
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
             if(value == "" || (isKey((key)value)) == 0)
             {
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Floor-drop Texture UUID is empty. (2) The Floor-drop UUID is not a key.");
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Floor-drop UUID Key is empty. (2) The Floor-drop UUID is not a key.");
            return;
            llResetScript();
             }
             }
             ThemesCount = ThemesCount +1; // add +1 to our themes count
             ThemesCount = ThemesCount +1;                                 // add +1 to our themes count
        }
            Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];   // add to our themes test list database
// add to our test list database
            }
Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];
           }
           }
         }
         }
Line 244: Line 299:
{
{
// loads up our test notecard
// loads up our test notecard
GetNoteName = id;
NoteCardInit((string)id, User);
NoteCardInit((string)GetNoteName, User);
   }     
   }     
  }
  }
Line 253: Line 307:
   if(request_id ==  NotecardQueryId)
   if(request_id ==  NotecardQueryId)
   {
   {
//  we start processing our notecard data
   ProcessThemes(data, User);
   ProcessThemes(data, User);
   }
   }
  }
  }
}
}
</lsl>
</source>
Our notecard script tester called (CODE).Notecard.Tester
<source lang="lsl2">
// Our test script for loading the notecard
// place this script with the main notecard one and then just click the object
// our test notecard name for reading
string NotecardName = "(Category Theme).Fantasy";
default
{
    state_entry()
    {
    }
    touch_start(integer total_number)
    {
    key User = llDetectedKey(0); // sets the user key
    // sending user key to the notecard reader script
    llMessageLinked(LINK_SET,0,"SetUserKey",User);
    // sending the note card name to the notecard reader script
    llMessageLinked(LINK_SET,0,"LoadThemes",(string)NotecardName);
    }
}
</source>
 
<pre>
<pre>
Test Run Output
Test Run Output
Line 269: Line 351:
List Dump Found Test: Fantasy Car,8f304cf2-7120-24e2-d1f1-db6b31bd6f6c,00000000-0000-0000-0000-000000000000
List Dump Found Test: Fantasy Car,8f304cf2-7120-24e2-d1f1-db6b31bd6f6c,00000000-0000-0000-0000-000000000000
</pre>
</pre>
[[Category:LSL_Library]]

Latest revision as of 19:03, 24 January 2015

This new update has been tested and works great

Read the script comments to have better understanding of the codes. [v1.6 Video]

Fixes in v1.6
  • Backdrop uuid now checks for NULL KEY
  • Checks the notecard for saved data
  • Clean up the script


Fixes in v1.5
  • New uuid Key checking function


Fixes in v1.4
  • Themes list format adding


Fixes in v1.3
  • Empty notecard data error checking
  • Spaces error checking
  • Add few more comments to some codes


Fixes in v1.2
  • Key names error checking
  • Other fixes that are not listed


Useful Functions - (See main script comments)
  • DumpListFind(list db, string name)
  • integer IsElement(list db, string search)
  • integer KeyNameCheck(list db, string search)
  • integer isKey(key uuid)


First make a notecard called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop, but holds the key format still for error checking. The notecard format can not have line spaces and need to be done just how you see the notecard settings here, the error checking works great for the script.

// our test notecard
[Author Name] = Maddox Deluxe
// Theme [1]
[Menu Button Name] = Fantasy Tiger
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
// Theme [2]
[Menu Button Name] = Fantasy Car
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
// Theme [3]
[Menu Button Name] = Fantasy Tree
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000

Or with out the comments.

[Author Name] = Maddox Deluxe
[Menu Button Name] = Fantasy Tiger
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[Menu Button Name] = Fantasy Car
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[Menu Button Name] = Fantasy Tree
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000

Our main script called (CODE).Notecard.Reader

// Notecard Multi-line Entries Configuration Reader v1.6 by Maddox Deluxe
// Error Checking for: Key Names, values, Empty Notecard Data, Line Spaces
// This script is free; you can redistribute it and/or modify it
// Just read the comments on the script
 
key NotecardQueryId;          // key name of the notecard
key LineRequestID;            // notecard line count
integer LineTotal;            // The number of lines in the notecard
integer LineIndex;            // index for data read requests
 
string Author_Name = "";      // variable for setting author name
string Menu_Button_Name = ""; // variable for setting menu button name to the themes list
string Back_Drop_UUID = "";   // variable for setting backdrop uuid key to the themes list
string Floor_Drop_UUID = "";  // variable for setting floor drop uuid key to the themes list

string data;                  // notecard data
string GetNoteName;           // notecard name 
 
list Themes;                  // our list database for testing
list KeyNames;                // our list database for the key names: [Author Name]. [Menu Button Name], ect..
 
integer ThemesCount;          // counts how many themes they are in the notecard configuration
 
key User;                     // user tracker key
 
// function by Maddox Deluxe    
// test to dump all 3 elements in the list that goes with each other
DumpListFind(list db, string name)
{
 integer index = llListFindList(db, [name]);
        if (~index)
        {
            list Found = llList2List(db, index, index + 2); 
 
            string BN = llList2String(Found,0);   
            string BD = llList2String(Found,1);
            string FD = llList2String(Found,2);
 
            llOwnerSay("Dump testing for list database search.\nAuthor Name: "+(string)Author_Name+ "\nButton Name: "+(string)BN+ "\nBackdrop Texture: "+(string)BD+ "\nFloor drop Texture: "+(string)FD);
 
    llOwnerSay("List Dump Found Test: "+llDumpList2String(Found, ","));
 
  //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
            if(FD != (key)"00000000-0000-0000-0000-000000000000")
            {
 //    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
            }
 
        }
}
// function by Maddox Deluxe    
// looks for 3 elements and the search string is the first element of the set
integer IsElement(list db, string search)
{
 integer index = llListFindList(db, [search]);
        if (~index)
        {
            list Found = llList2List(db, index, index + 2); 
 
            string str = llList2String(Found,0);   
            if (str == search) 
            return TRUE; // was found
        }
        return FALSE; // was not found
 }
// function by Maddox Deluxe
// checks the key names making sure they match what is setup in the notecard 
integer KeyNameCheck(list db, string search)
{
    integer i;
    for (i=0;i<llGetListLength(db);++i)
    {
        string s = llList2String(db,i);  
        if (s==search) return TRUE;
    }
    return FALSE;
}

// Checks the uuid keys in the notecard, making sure they are real keys
// 2 valid key, not NULL_KEY
// 1 (TRUE):  NULL_KEY
// 0 (FALSE): not a key
// https://wiki.secondlife.com/wiki/Category:LSL_Key
integer isKey(key uuid)
{
    if (uuid)
        return 2;
    return (uuid == NULL_KEY);
}

// notecard initialization
NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage
{
 if (llGetInventoryKey(GrabNoteCardName) == NULL_KEY) // update v1.6 with notecard null key checking
  {
 llInstantMessage(id,"Notecard '" +GrabNoteCardName+ "' (1) The notecard key is null, write some data in it and hit save. (2) Notecard was not found.");
   return;   
    }
    else
    LineRequestID = llGetNumberOfNotecardLines(GrabNoteCardName); // total number of lines in the notecard
    Themes = [];      // clear the themes list
    LineIndex = 0;    // start reading from line 0
    ThemesCount = 0;  // start adding from 0
    NotecardQueryId = llGetNotecardLine(GrabNoteCardName, LineIndex);
    KeyNames = [];    // clear the keynames list
                      // setup our key names
    KeyNames = ["[author name]","[menu button name]","[backdrop texture uuid]","[floordrop texture uuid]"];
    llInstantMessage(id,"Please stand by, reading themes configuration for " +GrabNoteCardName);
    GetNoteName = GrabNoteCardName;
}

ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage
{
list cmd;
string cmd_grab;
string value;
 
//  if we are at the end of the file
  if(data == EOF)
    {
        llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
 
         // lets use the 2nd search string for this test, the search strings are the button names in the notecard configuration
         string TestSearch = "Fantasy Car";
         if(IsElement(Themes,TestSearch)==FALSE)
         {
         llInstantMessage(id,"Themes Configuration Error. Button search string was not found.");
         return;
          }
         else
          DumpListFind(Themes,TestSearch);
          return;
         }
         if(data == "")
         {
         llInstantMessage(id,"Themes Configuration Format Error. (1) No DATA found. (2) Got line spaces.");
         llResetScript();
         }
         if(data != "")
         {
             // lets move on and read the next line
             NotecardQueryId = llGetNotecardLine(GetNoteName, ++LineIndex);
            
            // cut off any leading blanks
            // ignore comment lines
            // if you change the comment line from // to #, make sure you change the 1 to 0
            if (llGetSubString(data, 0, 1) != "//" && llStringTrim(data, STRING_TRIM) != "" )
            {
            cmd = llParseString2List(data, ["="], []);
            cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
            value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
            
            // we only need this at the start to check for key name errors :)
            if(KeyNameCheck(KeyNames,cmd_grab)==FALSE)
            {
             llInstantMessage(id,"Themes Configuration Format Error on line: " +(string)LineIndex+ ".");
             llResetScript();
             }
             if(cmd_grab == "[author name]")
             {
             Author_Name = value;
            // error checking for Author Name
            if(value == "")
             {
            llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Author Name can not be empty.");
            llResetScript();
             }
           }
            else
            if(cmd_grab == "[menu button name]")
            {
            Menu_Button_Name = value;
            // error checking for Menu Button Name
            if(value == "")
            {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Menu Button Name can not be empty.");
             llResetScript();
             }
            }
            else
            if(cmd_grab == "[backdrop texture uuid]")
            {
            Back_Drop_UUID = value;
            // error checking for BackDrop Texture UUID
            if(value == "" || (isKey((key)value)) == 1 || (isKey((key)value)) == 0)
            {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Backdrop UUID Key is empty. (2) The Backdrop UUID is not a key. (3) The Backdrop UUID Key is NULL.");
             llResetScript();
            }
          }
           else
           if(cmd_grab == "[floordrop texture uuid]")
            {
            Floor_Drop_UUID = value;
            // error checking for FloorDrop Texture UUID
            if(value == "" || (isKey((key)value)) == 0)
            {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Floor-drop UUID Key is empty. (2) The Floor-drop UUID is not a key.");
             llResetScript();
            }
            ThemesCount = ThemesCount +1;                                  // add +1 to our themes count
            Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];   // add to our themes test list database
             }
           }
        }
    } 
default
{
 
link_message(integer sender_num, integer num, string str, key id)
{
if(str == "SetUserKey")
{
// sets up the user key that click the object
User = (key)id; 
}
if(str == "LoadThemes") 
{
// loads up our test notecard
NoteCardInit((string)id, User);
  }    
 }
//  triggered when task receives asynchronous data
 dataserver(key request_id, string data)
  {
  if(request_id ==  NotecardQueryId)
   {
//  we start processing our notecard data
   ProcessThemes(data, User);
   }
 }
}

Our notecard script tester called (CODE).Notecard.Tester

// Our test script for loading the notecard
// place this script with the main notecard one and then just click the object
 
// our test notecard name for reading
string NotecardName = "(Category Theme).Fantasy";
 
default
{
    state_entry()
    {
 
    }
 
    touch_start(integer total_number)
    {
    key User = llDetectedKey(0); // sets the user key
    // sending user key to the notecard reader script
    llMessageLinked(LINK_SET,0,"SetUserKey",User);
 
    // sending the note card name to the notecard reader script
    llMessageLinked(LINK_SET,0,"LoadThemes",(string)NotecardName);
    }
}
Test Run Output
---------------
Dump testing for list database search.
Author Name: Maddox Deluxe
Button Name: Fantasy Car
Backdrop Texture: 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
Floor drop Texture: 00000000-0000-0000-0000-000000000000

List Dump Found Test: Fantasy Car,8f304cf2-7120-24e2-d1f1-db6b31bd6f6c,00000000-0000-0000-0000-000000000000