
I created an object that needed a very large dialog menu. no matter what i did i was gettin a sytax error, then i learned it was b/c i had too many else's. so i read the wiki and find out that there is a limit of 23 ( else's ) and 24 if i add an ( if ) and the wiki suguested to "nest". so nesting/grouping i tried.. this way, that way and nothing worked out. so here i am after 2 nights of addin this and removing that.. i would love to learn to do this, but i learn from example and an "Example: 30 Option Multi-level Dialog Script" doesnt exist, or at least i cant find it. i was only creating this as an example for me to use as a refrence, and i know there are better ways of codeing a "Roach Coach", lol
like i said i have removed, added, and re-written this a few times so, at this point i dont really know whats in there that should or shouldnt be, lol
ok, no matter what i do it chokes right after i select the topping, and never announces the llSay(0, "_____ with _____"
message.integer CHANNEL = 123456;
integer DialogCHANNEL = 654321;
list MENU_MAIN = ["Hamburger", "Salad", "Pizza", "Ice Cream", "Hot Dog"];
list HAMBURGER_OPTIONS = ["Lettice", "Pickle", "Tomato", "Cheese", "...Back"];
list SALAD_OPTIONS = ["French", "Ranch", "Ceaser", "Thousand Island", "Plain", "...Back"];
list PIZZA_OPTIONS = ["Ham", "Pineapple", "Bacon", "Xtra Cheese", "...Back"];
list ICECREAM_OPTIONS = ["Sprinkles", "Nuts", "Hot Fudge", "Cherry", "Bannana", "Wip Cream", "...Back"];
list HOTDOG_OPTIONS = ["Ketchup", "Mustard", "Relish", "Onion", "Chili", "...Back"];
default
{
state_entry()
{
llListen(DialogCHANNEL, "", NULL_KEY, ""
;}
touch_start(integer total_number)
{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
if (llListFindList(MENU_MAIN, [message]) != -1)
{
if (message == "Hamburger"

{
llDialog(id, "What topping would you like on your burger?\nYou only get one!", HAMBURGER_OPTIONS, DialogCHANNEL);
{
if (message == "Lettice"

{
llSay(0, "Hamburger with Lettice"
;}
else if (message == "Pickle"

{
llSay(0, "Hamburger with Pickle"
;}
else if (message == "Tomato"

{
llSay(0, "Hamburger with Tomato"
;}
else if (message == "Cheese"

{
llSay(0, "Hamburger with Cheese"
;}
else if (message == "Pickle"

{
llSay(0, "Hamburger with Pickle"
;}
else if (message == "Pickle"

{
llSay(0, "Hamburger with Pickle"
;}
else if (message == "...Back"

{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
}
}
}
if (llListFindList(SALAD_OPTIONS, [message]) != -1)
{
if (message == "Salad"

{
llDialog(id, "What dressing would you like on your salad?\nYou only get one!", SALAD_OPTIONS, DialogCHANNEL);
{
if (message == "French"

{
llSay(0, "Salad with French"
;}
else if (message == "Ranch"

{
llSay(0, "Salad with Ranch"
;}
else if (message == "Ceaser"

{
llSay(0, "Salad with Ceaser"
;}
else if (message == "Thousand Island"

{
llSay(0, "Salad with Thousand Island"
;}
else if (message == "Plain"

{
llSay(0, "Salad with Plain"
;}
else if (message == "...Back"

{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
}
}
}
if (llListFindList(PIZZA_OPTIONS, [message]) != -1)
{
if (message == "Pizza"

{
llDialog(id, "What topping would you like on your pizza?\nYou only get one!", PIZZA_OPTIONS, DialogCHANNEL);
{
if (message == "Ham"

{
llSay(0, "Pizza with Ham"
;}
else if (message == "Pineapple"

{
llSay(0, "Pizza with Pineapple"
;}
else if (message == "Bacon"

{
llSay(0, "Pizza with Bacon"
;}
else if (message == "Xtra Cheese"

{
llSay(0, "Pizza with Xtra Cheese"
;}
else if (message == "...Back"

{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
}
}
}
if (llListFindList(ICECREAM_OPTIONS, [message]) != -1)
{
if (message == "Ice Cream"

{
llDialog(id, "What topping would you like on your ice cream?\nYou only get one!", ICECREAM_OPTIONS, DialogCHANNEL);
{
if (message == "Sprinkles"

{
llSay(0, "Ice Cream with Sprinkles"
;}
else if (message == "Nuts"

{
llSay(0, "Ice Cream with Nuts"
;}
else if (message == "Hot Fudge"

{
llSay(0, "Ice Cream with Hot Fudge"
;}
else if (message == "Cherry"

{
llSay(0, "Ice Cream with a Cherry"
;}
else if (message == "Bananna"

{
llSay(0, "Ice Cream with Bananna"
;}
else if (message == "Wip Cream"

{
llSay(0, "Ice Cream with Wip Cream"
;}
else if (message == "...Back"

{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
}
}
}
if (llListFindList(HOTDOG_OPTIONS, [message]) != -1)
{
if (message == "Hot Dog"

{
llDialog(id, "What topping would you like on your hotdog?\nYou only get one!", HOTDOG_OPTIONS, DialogCHANNEL);
{
if (message == "Ketchup"

{
llSay(0, "Hot Dog with Ketchup"
;}
else if (message == "Mustard"

{
llSay(0, "Hot Dog with Mustard"
;}
else if (message == "Relish"

{
llSay(0, "Hot Dog with Relish"
;}
else if (message == "Onion"

{
llSay(0, "Hot Dog with Onion"
;}
else if (message == "Chili"

{
llSay(0, "Hot Dog with Chili"
;}
else if (message == "...Back"

{
llDialog(llGetOwner(), "What would you like?", MENU_MAIN, DialogCHANNEL);
}
}
}
}
}
}