|
KINGR Redgrave
Registered User
Join date: 23 Dec 2006
Posts: 37
|
12-27-2006 16:29
When my dialog box pops up, and i try to click on the options tab to have that menu appear, it doesnt work.What am i doing wrong??? string MENU_PROMPT = "What do you need help with?"; list MENU_BUTTONS = ["Scan", "option"]; list MENU_OPTION = ["help"]; integer MENU_CHANNEL = 1024;
default { state_entry() { llListen(0,"",NULL_KEY,""); } listen(integer channel, string name, key id, string message) { if (llToLower(message) == "help") llDialog(id, MENU_PROMPT, MENU_BUTTONS, MENU_CHANNEL); else if (message == "option") llDialog(id, "", MENU_OPTION, MENU_CHANNEL); } }
|
|
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
|
12-27-2006 16:32
you have only one listener open, on channel 0. So the object is only listening on that channel, where your menu options is set to channel 1024, as you have it defined in the script. You need to add another listener for channel 1024.
|
|
KINGR Redgrave
Registered User
Join date: 23 Dec 2006
Posts: 37
|
12-27-2006 16:41
how would i do that, i added anotehr llListen(1024 .... under the first one,but doesnt do anything when i click on the option tab.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
12-27-2006 17:09
I assume when you say tab you mean button?
As has been previousy suggested KINGR, open listens are a really really bad idea.
But back to your question. You dont seem to be supplying anything in the message parameter of the second llDialog call. You must have at least one character even if it is a space. try a space i.e.
llDialog(id, " ", MENU_OPTION, MENU_CHANNEL);
|
|
KINGR Redgrave
Registered User
Join date: 23 Dec 2006
Posts: 37
|
12-27-2006 17:26
haha i GOT IT!! i new it was a easy question, i jsut put a space between the quotes,thanks  anyway i just keep the channel at 0 because its just a little quicker to try scripts instead of /1 ect... just for the experimenting im keeping it 0.if i do release something or build something i will use (wich i plan on doing when im good enouph) i will change it to a different channel.thanks for the heads up tho
|
|
KINGR Redgrave
Registered User
Join date: 23 Dec 2006
Posts: 37
|
12-27-2006 17:38
Another question though, how would i add a command such as SCAN to THIS script??
|