Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Menu!!!!

Leland Lowell
Registered User
Join date: 2 Mar 2006
Posts: 3
04-05-2007 16:05
Got an object here that i want ppl to be able to click on and get a pop up menu, then have various buttons for interaction...but I have no idea what im doing lol. Does anyone know the script command atleast so get the menu pop up? Plz plz help if you can. Thanks
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
04-05-2007 16:16
https://wiki.secondlife.com/wiki/Dialog_NumberPad
Simil Miles
Creator
Join date: 1 Mar 2007
Posts: 300
04-05-2007 22:36
llDialog
_____________________
UnConWTech @ Flo (144, 84, 224) http://unconwtech.free.fr

SL books http://astore.amazon.com/secondlife-sl-20/

Need a beta tester for quality assurance ?
Need a translator for English, French, Spanish ?
Leland Lowell
Registered User
Join date: 2 Mar 2006
Posts: 3
Menu Help
04-06-2007 15:50
Thanks alot for the help....sat and figured out the code but I think i have a problem somwhere...
============= part of script ==========================

listen(integer channel, string name, key id, string message)
{
if (message == "A";)
{
llSay(0, name + " you clicked A ";);
}
if (message == "B";);
{
llSay(0, name + " you clicked B ";);
}
if (message == "C";)
{
llSay(0, name + " you clicked C ";);
}
}
}
=============End=================================

But now when i click on the "A" button, I get "you clicked A & you clicked B". Then when I click on the "B" button I get "you clicked B & you clicked C.....Any idea what the problem is?
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
04-06-2007 16:13
CODE
listen(integer channel, string name, key id, string message)
{
if (message == "A")
{
llSay(0, name + " you clicked A ");
}
else if (message == "B") // <<< lose the semi-colon
{
llSay(0, name + " you clicked B ");
}
else if (message == "C")
{
llSay(0, name + " you clicked C ");
}
}
...you've inadvertently closed the "B" condition with a semi-colon. Also, it's good practice to 'else if' the conditions following the first (although it is only the extra semi-colon causing your immediate problem).

You also seem to have an extra brace on the end but I'm guessing this is just a copy/paste error. :)
Leland Lowell
Registered User
Join date: 2 Mar 2006
Posts: 3
WOOT my wife found the problem! lol
04-06-2007 16:19
Sorry...my wife came in and totally found the problem in like 5mins. lol Id be lost with out her. Thanks again for the replys to the thread. And yes the ; was the problem...ugh. Thanks again lol