I did a script which give landmarks to others users.
When the first user touch my object, a llDialog show a menu (each item of this menu are contain into a notecard named "menu).
The user select an item of this menu.
So an other menu is open (each item of this second menu are into a notecard with the same name of the first item selected in the firt menu).
When the user select an item of the menu 2, a get a landmark with the name of the selected item.
My question is :
With the script below, if a second user touch my object whereas the first user is in the second llDialog. What's happen?
I'm new in scripting, I don't understand when touch_start event finish.
integer channel = 1001;
list malist = [];
string noteCardName = "menu";
key cle;
integer line = 0;
key user;
string entete;
default
{
state_entry()
{
//permet d'écouter sur le cannal 1000
llListen(channel,"", "",""
;}
touch_start(integer total_number)
{
malist = [];
line = 0;
noteCardName = "menu";
entete = "Choose a category";
user = llDetectedKey(0);
//récupère la notecard
cle = llGetNotecardLine(noteCardName,line);
}
//écoute du cannal
listen(integer chan, string name, key id, string mes)
{
if(noteCardName != "menu"

{
llSay(0,"you chose : " + mes);
//donne l'objet
llGiveInventory(id,mes);
}
else
{
noteCardName = mes;
malist = [];
line = 0;
//récupère la notecard
cle = llGetNotecardLine(noteCardName,line);
}
}
dataserver(key query_id, string data)
{
if(query_id == cle)
{
//si on est pas a la fin de la note card
if(data != EOF)
{
malist += data;
line++;
cle = llGetNotecardLine(noteCardName,line);
}
else
{
if(noteCardName != "menu"

{
entete = "Choose a lanmark in " + noteCardName;
}
//fait apparaitre une boite de dialogue
llDialog(user,entete,
malist,channel);
}
}
}
}
thanks
I'm Dutch but I always use English and it's great for when you give or sell a script full perm