-
Posts
8 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Rogue Galaxy
-
-
yep... its now WORKING!
as a side note.. is there a way to add a piece of code that when the "join group" button is clicked that they get a link to click to join the group instead of getting a note card? just curious.. and if so.. what code and where do I place it? TY!
THANK YOU FOLKS!
- 1
-
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 listeningdefault
{
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/");
}
}
} -
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 listeningdefault
{
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/");
}
}
} -
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
-
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 listeningdefault
{
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/");
}
}
}
HELP with a drop down menu Script! PLEASE HELP/ADVISE! Thank you!! arrggg!
in LSL Scripting
Posted
Thank you!! that worked!