Jump to content

syntax error please help XD


snickersphilia
 Share

You are about to reply to a thread that has been inactive for 437 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

integer listener;

integer channel = 0;
string msg = "69";
string soundName = "NICE Sound";

default
{
    state_entry()
    {
        listener = llListen(channel,"69","69!",msg); 
    }

    listen(integer channel, string msg, string soundName)
    {
        llPlaySound(soundName,1.0);
    }
}

Link to comment
Share on other sites

That's because the script, as written, is not making sense.  Basically, you are trying to make it listen for someone to type "69" on local chat (that is, in chat channel 0).  So you want something that looks more like this...

string soundName = "NICE Sound";

default
{
    state_entry()
    {
        llListen(0," ", " ", "69"); 
    }

    listen(integer channel, string name, key id, string msg)
    {
        llPlaySound(soundName,1.0);
    }
}

There are ways to improve that script significantly, but that's the basic idea.  I really suggest that you read the wiki entries that I posted earlier to get a better feel for how the script works.  Perhaps work through a beginning tutorial too.   Try https://wiki.secondlife.com/wiki/Getting_started_with_LSL or any of the resources listed here... https://wiki.secondlife.com/wiki/LSL_Tutorial

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 437 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...