Jump to content

Rogue Galaxy

Resident
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Rogue Galaxy

  1. 1 hour ago, KT Kingsley said:

    You want something like

    
    if (_option == "Join group")
    {
        llRegionSayTo (_id, PUBLIC_CHANNEL, "Click to join group secondlife:///app/group/<group uri goes here>/about");
    }

    in the listen event code.

    In Firestorm you can find the group URI at the top of the Group Profile window; I'm not sure what the SL viewer can offer. If the object is set to the group in question you could also use llGetObjectDetails with the parameter OBJECT_GROUP.

    More about the viewer URI facilities here: http://wiki.secondlife.com/wiki/Viewer_URI_Name_Space.

    Thank you!! :) that worked!

     

    • Like 1
  2. 2 hours ago, Xiija said:

    just need to clean it up a bit, something like....

    
    integer channel;                       
    integer listening;                  
    default
    {
        on_rez(integer start_param)
        { llResetScript();  
        }
        state_entry()
        { channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);    
        }
        touch_start(integer total_number)
        { llDialog(llDetectedKey(0),
            "\nPlease choose an option:",
            (["Booking", "Song List", "Join Group","WebSite", "Calendar","Facebook","Reverb","Youtube"]),
            channel); 
          listening = llListen(channel,"", "",""); 
        }    
        listen(integer _chan, string _name, key _id, string _option)
        { llListenRemove( listening );
         
          if (_option == "Booking")
          { llGiveInventory(_id,"Booking Info");
          }
          if (_option == "Song List")
          { llGiveInventory(_id,"Song List");
          } 
          if (_option == "Join Group")
          { llGiveInventory(_id,"Join Group");
          }
          if (_option == "WebSite")
          {  llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");     
          }
          if (_option == "Calendar")
          {   llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
          }
          if (_option == "Facebook")
          {   llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
          }
          if (_option == "Reverb")
          {    llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
          }
          if (_option == "Youtube")
          {   llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }      
        }
    } 

     

    I've cleaned it up.. it now looks like this.. but when I click the info board.. it does nothing.. no drop down.. no buttons to choose from

     


    integer channel;                        // Channel for communication between Clicker and our Script
    integer listening;                      // Handle listening

     

    default
    {
        state_entry()
        {
           channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);
           listening = llListen(channel,"", "","");
        }
        
        on_rez(integer start_param)
        {
          llResetScript();   // We reset script on rez, so that it generates new channel for communication
        }

        touch_start(integer total_number)
        {
         
           llDialog(llDetectedKey(0),
        "\nPlease choose an option:",
        (["Booking", "Song List", "Join Group","WebSite", "Calendar","Facebook","Reverb","Youtube"]),
        channel);  
        }
        
        listen(integer _chan, string _name, key _id, string _option)
        {
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Booking Info");
          }
          
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Song List");
          }
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Join Group");
          }
          if (_option == "WebSite")
          {
             llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");
          }
           if (_option == "Calendar")
          {
             llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
          }
           if (_option == "Facebook")
          {
             llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
          }
           if (_option == "Reverb")
          {
             llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
          }
           if (_option == "Youtube")
       {
             llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }  
        }
    }

     

  3. 1 hour ago, Wulfie Reanimator said:

    The main problem in your script is that you've lost track of your curly-braces. The "{" and "}" ones.

    They're like a little box. They hold stuff together. If you you misplace them, you break them. Specifically, on line 35 and 40:

    
    ...
    28    listen(integer _chan, string _name, key _id, string _option)
    29    {
    30      if (_option == "Notecard")
    31      {
    32        llGiveInventory(_id,"Booking Info");
    33      }
    34
    35       {  // <--- This
    36      if (_option == "Notecard")
    37      {
    38        llGiveInventory(_id,"Song List");
    39      }
    40  {       // <--- This
    ...

    I imagine you've tried to remove something and copy-paste something in its place. But what you've done now is told the script that something begins at those two places I've highlighted. If we follow the pairs, we'd see that there aren't enough closing-braces, and the script gets confused because it has lost track.

    If you remove those two opening-braces, you'll get rid of the syntax error. But there's another problem.

    
    ...
    43      if (_option == "WebSite")
    44      {
    45         llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");
    46      }
    47      {
    48         llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
    49      }
    50      {
    51         llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
    52      }
    53      {
    54         llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
    55      }
    56      {
    57         llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
    58      }
    ...

    While this technically works, I don't think it's doing what you intended.

    The first { } pair happens if the option is "Website" but the rest will always happen, because they don't have any leading condition, unlike the first one.

    I imagine you'll have a separate button for each link, so I can't fix this for you. Xiija gave a good example though.

    Alternatively, if you want more than one thing to happen for the same condition (for example, load all of the URLs when the Website button is clicked), you could do this:

    
          if (_option == "WebSite")
          {
             llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");
             llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
             llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
             llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
             llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }

     

    Hi Wulfie :) Thank you!

    The error is now gone.. and I've cleaned it up like Xiija suggested.. and I get no errors.. however.. now when I click on the info board.. I get nothing.. it doesn't do anything..

     

    here's what Ive done now..


    integer channel;                        // Channel for communication between Clicker and our Script
    integer listening;                      // Handle listening

     

    default
    {
        state_entry()
        {
           channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);
           listening = llListen(channel,"", "","");
        }
        
        on_rez(integer start_param)
        {
          llResetScript();   // We reset script on rez, so that it generates new channel for communication
        }

        touch_start(integer total_number)
        {
         
           llDialog(llDetectedKey(0),
        "\nPlease choose an option:",
        (["Booking", "Song List", "Join Group","WebSite", "Calendar","Facebook","Reverb","Youtube"]),
        channel);  
        }
        
        listen(integer _chan, string _name, key _id, string _option)
        {
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Booking Info");
          }
          
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Song List");
          }
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Join Group");
          }
          if (_option == "WebSite")
          {
             llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");
          }
           if (_option == "Calendar")
          {
             llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
          }
           if (_option == "Facebook")
          {
             llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
          }
           if (_option == "Reverb")
          {
             llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
          }
           if (_option == "Youtube")
       {
             llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }  
        }
    }

     

  4. 2 hours ago, Xiija said:

    just need to clean it up a bit, something like....

    
    integer channel;                       
    integer listening;                  
    default
    {
        on_rez(integer start_param)
        { llResetScript();  
        }
        state_entry()
        { channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);    
        }
        touch_start(integer total_number)
        { llDialog(llDetectedKey(0),
            "\nPlease choose an option:",
            (["Booking", "Song List", "Join Group","WebSite", "Calendar","Facebook","Reverb","Youtube"]),
            channel); 
          listening = llListen(channel,"", "",""); 
        }    
        listen(integer _chan, string _name, key _id, string _option)
        { llListenRemove( listening );
         
          if (_option == "Booking")
          { llGiveInventory(_id,"Booking Info");
          }
          if (_option == "Song List")
          { llGiveInventory(_id,"Song List");
          } 
          if (_option == "Join Group")
          { llGiveInventory(_id,"Join Group");
          }
          if (_option == "WebSite")
          {  llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");     
          }
          if (_option == "Calendar")
          {   llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
          }
          if (_option == "Facebook")
          {   llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
          }
          if (_option == "Reverb")
          {    llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
          }
          if (_option == "Youtube")
          {   llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }      
        }
    } 

     

    This "clean up" didn't work in a prim either. Im not sure whatthe hell Im doing wrong

     

  5. Hello,

    First, let me tell you I'm not a scripter but I can edit simple scripts for my needs. I bought a script on the Marketplace and couldn't edit it, quite honestly,  it was beyond my comprehension of scripts. So I contacted the maker and he sent me a "Simple" script to use with instruction to just copy the note card or website part of the script to suit my needs.. well Ive done that and it's still not working.. I keep getting a syntax error.. Ive gone over it several times and still it's not working.

    The idea of the script is an info board.. when clicked, it will give a drop down menu of buttons to choose from.. and will either give the clicker a note card, or open a website. Can you take a look at this script and advise me of where I've gone wrong please?  The ERROR:  (62, 1) : ERROR : Syntax error

     


    integer channel;                        // Channel for communication between Clicker and our Script
    integer listening;                      // Handle listening

     

    default
    {
        state_entry()
        {
           channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);
           listening = llListen(channel,"", "","");
        }
        
        on_rez(integer start_param)
        {
          llResetScript();   // We reset script on rez, so that it generates new channel for communication
        }

        touch_start(integer total_number)
        {
         
           llDialog(llDetectedKey(0),
        "\nPlease choose an option:",
        (["Booking", "Song List", "Join Group","WebSite", "Calendar","Facebook","Reverb","Youtube"]),
        channel);  
        }
        
        listen(integer _chan, string _name, key _id, string _option)
        {
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Booking Info");
          }
          
           {
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Song List");
          }
      {
          if (_option == "Notecard")
          {
            llGiveInventory(_id,"Join Group");
          }
          if (_option == "WebSite")
          {
             llLoadURL(_id, "Visit website?", "https://www.roguegalaxymusic.com");
          }
          {
             llLoadURL(_id, "Visit website?", "https://calendar.google.com/calendar/embed?src=moj8pm1uojuciitflq8d02uh60%40group.calendar.google.com&ctz=America%2FNew_York");
          }
          {
             llLoadURL(_id, "Visit website?", "https://www.facebook.com/RogueGalaxySL");
          }
          {
             llLoadURL(_id, "Visit website?", "https://www.reverbnation.com/cathietimian");
          }
       {
             llLoadURL(_id, "Visit website?", "https://www.youtube.com/c/cathietimian/");
          }  
        }
    }

     

     

     

×
×
  • Create New...