Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

I'm confused

Shippou Oud
The Fox Within
Join date: 11 Jul 2005
Posts: 141
02-04-2007 16:56
What am I doing wrong with this script? I know it's probly something simple, but just do not see it. it fails to "llSay" after I make the choice =-/
From: someone

list menue = ["Opt7","Opt8","Opt9","Opt4","Opt5","Opt6","Opt1","Opt2","Opt3","Opt0"];
integer ch = -2121;
default
{
on_rez(integer x)
{
llResetScript();
}

state_entry()
{

}

touch_start(integer total_number)
{
if (llDetectedKey(0) != llGetOwner())
{
string uu = llKey2Name(llDetectedKey(0));
llInstantMessage(llDetectedKey(0),"Sorry " + uu + " you are not the owner of this bed";);
}
if (llDetectedKey(0) == llGetOwner())
{
llDialog(llGetOwner(), "What would you like?", menue,ch);

}
}

listen(integer ch, string name, key id, string choice )
{
if (choice == "Opt0";)
{
llSay(0,"Opt0";);
}
if (choice == "Opt1";)
{
llSay(0,"Opt1";);
}
if (choice == "Opt2";)
{
llSay(0,"Opt2";);
}
if (choice == "Opt3";)
{
llSay(0,"Opt3";);
}
if (choice == "Opt4";)
{
llSay(0,"Opt4";);
}
if (choice == "Opt5";)
{
llSay(0,"Opt5";);
}
if (choice == "Opt6";)
{
llSay(0,"Opt6";);
}
if (choice == "Opt7";)
{
llSay(0,"Opt7";);
}
if (choice == "Opt8";)
{
llSay(0,"Opt8";);
}
if (choice == "Opt9";)
{
llSay(0,"Opt9";);
}

}
}

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
02-04-2007 17:19
After you call the dialog, you need to open a listen channel (llListen on channel ch; filter by owner, too).

Baron H.
Shippou Oud
The Fox Within
Join date: 11 Jul 2005
Posts: 141
02-04-2007 17:30
thanks =^-^=