Advertisement
Madi_Perth

Untitled

Mar 15th, 2024 (edited)
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Linden Scripting 2.34 KB | Source Code | 0 0
  1. dataserver(key queryid, string data)
  2.     {
  3.         if(queryid == currentNoteLength_qry)
  4.         {
  5.             currentNoteLength = (integer) data;
  6.             integer index;
  7.  
  8.             for(index = 0; index < (currentNoteLength + 1); index++)
  9.             {
  10.                 string line = llGetNotecardLineSync(currentNotecard_name, index);
  11.                 DS("sync " + line);
  12.                 if( line == NAK)
  13.                 {
  14.                     currentNotecard_line = 0;
  15.                     currentNotecard_query  =  llGetNotecardLine(currentNotecard_name,
  16.                                         currentNotecard_line);
  17.  
  18.                 } else if (line == EOF)
  19.                 {
  20.                     integer length = llList2Integer(currentSong_info, 2) *
  21.                         (llGetListLength(currentSong_info) - 3);
  22.    
  23.                     DS ("Length " + getInlineTime(length) );
  24.                     DS ("song info : \n" + llDumpList2String(currentSong_info, "\n"));
  25.                     // songLength = length;
  26.                     // set_text(RED);
  27.                     DS("EOF");
  28.                     play_song();
  29.                 } else
  30.                 {
  31.                     DS("sync : else");
  32.                     if(currentNotecard_line == 0)
  33.                         songLength = (integer) line;
  34.                     currentSong_info += llStringTrim(line, STRING_TRIM);
  35.                 }
  36.             }
  37.         }
  38.        
  39.         if(queryid == currentNotecard_query)
  40.          {
  41.              if(data == EOF)
  42.              {
  43.                  integer length = llList2Integer(currentSong_info, 2) *
  44.                      (llGetListLength(currentSong_info) - 3);
  45.  
  46.                  DS ("Length " + getInlineTime(length) );
  47.                  DS ("song info : \n" + llDumpList2String(currentSong_info, "\n"));
  48.                  // songLength = length;
  49.                  // set_text(RED);
  50.                  DS("EOF");
  51.                  play_song();
  52.              }
  53.              else
  54.              {
  55.                  if(currentNotecard_line == 0)
  56.                      songLength = (integer) data;
  57.                  currentSong_info += llStringTrim(data, STRING_TRIM);
  58.                  currentNotecard_query  =  llGetNotecardLine(currentNotecard_name,
  59.                                     ++currentNotecard_line);
  60.              }
  61.          }
  62.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement