Background Bird Songs

Copy and paste the script:-

// Title: British Birdsongs
// Written: 11/04/2007
// Comments:
//
//
//
string version = "version: 1.00"; // change for each version
list listSongs;
integer counter;
integer songCount;
integer song;

//
// GMT time display in HH:MM format
//
float seconds;
float hours;
float minutes;
integer hh;
integer mm;
integer ss;
string HH;
string MM;

string hhmm()
{
seconds = llGetGMTclock();
hours = (seconds/3600);
hh = (integer)hours;
HH = (string)hh;
if(hh < 10) HH = "0" + HH;

minutes = (hours - (integer)hours) * 60;
mm = (integer)minutes;
MM = (string)mm;

if(mm ";
}
//
zzDisplay(list out) { // output debug info
llOwnerSay(llList2CSV(out));
}

// global initialization function.
//
init()
{
llOwnerSay(hhmm() + version);
llSetObjectDesc(version);
//
listSongs = [];
songCount = llGetInventoryNumber(INVENTORY_SOUND);
for(counter=0;counter < songCount;counter++){
listSongs += llGetInventoryName(INVENTORY_SOUND,counter);
}
llSetTimerEvent(11);
}

default
{
state_entry()
{
init();
}

on_rez(integer start_param)
{
init();
}

timer()
{
song = (integer)llFrand(songCount);
llPlaySound(llList2String(listSongs,song),1.0);

}
}

Advertisements

2 responses to “Background Bird Songs

  1. Hi. Thank you very much for this script. I’m trying to make it work in OpenLife on the OpenSim platform. I changed the quotation marks to get rid of a few errors, but then get this:

    Primitive: Error compiling script:
    Line 78, char 0: Unexpected EOF

    Any ideas? Thanks again.

  2. Hi Mike

    The script has 77 lines, so I’d suggest you check your paste, perhaps by pasting into notepad and then checking you have matching curly brackets.

    Did you copy the script from this blog, or from the box on my parcel? (http://slurl.com/secondlife/Stamper/21/7/32)

    Benja

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s