Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dataserver(key queryid, string data)
- {
- if(queryid == currentNoteLength_qry)
- {
- currentNoteLength = (integer) data;
- integer index;
- for(index = 0; index < (currentNoteLength + 1); index++)
- {
- string line = llGetNotecardLineSync(currentNotecard_name, index);
- DS("sync " + line);
- if( line == NAK)
- {
- currentNotecard_line = 0;
- currentNotecard_query = llGetNotecardLine(currentNotecard_name,
- currentNotecard_line);
- } else if (line == EOF)
- {
- integer length = llList2Integer(currentSong_info, 2) *
- (llGetListLength(currentSong_info) - 3);
- DS ("Length " + getInlineTime(length) );
- DS ("song info : \n" + llDumpList2String(currentSong_info, "\n"));
- // songLength = length;
- // set_text(RED);
- DS("EOF");
- play_song();
- } else
- {
- DS("sync : else");
- if(currentNotecard_line == 0)
- songLength = (integer) line;
- currentSong_info += llStringTrim(line, STRING_TRIM);
- }
- }
- }
- if(queryid == currentNotecard_query)
- {
- if(data == EOF)
- {
- integer length = llList2Integer(currentSong_info, 2) *
- (llGetListLength(currentSong_info) - 3);
- DS ("Length " + getInlineTime(length) );
- DS ("song info : \n" + llDumpList2String(currentSong_info, "\n"));
- // songLength = length;
- // set_text(RED);
- DS("EOF");
- play_song();
- }
- else
- {
- if(currentNotecard_line == 0)
- songLength = (integer) data;
- currentSong_info += llStringTrim(data, STRING_TRIM);
- currentNotecard_query = llGetNotecardLine(currentNotecard_name,
- ++currentNotecard_line);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement