///Loads and xmlcard into the main list variable /// /// state NotecardtoList { //Start at beginning of xmlcard state_entry() { integer ready = TRUE; if (llGetInventoryKey(NOTE_CARD) == NULL_KEY) { llOwnerSay("Error: \"" + NOTE_CARD + "\" does not exist in the object's inventory."); ready = FALSE; } if (ready) { if(curLine == 0) llWhisper(0, "Please wait. Reading data from "+NOTE_CARD+"...."); llGetNotecardLine(NOTE_CARD, curLine); // request first line } } //dataserver event is triggered when the requested data is returned to the script. dataserver(key queryid, string data) { if (data == EOF) { llOwnerSay("Completed loading " + NOTE_CARD); state default; } else { if(data != "") { //Check to see if the line begins with a '#' (comment line) if (llSubStringIndex(data, "#") == -1) { notecard += data; // Add the current notecard line to the string } } //Always advance the reading of the card... ++curLine; // increase line count state __getnotecardtolist; } } }]]>