Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

send a landmark

Tony21 Jonesford
Registered User
Join date: 17 Sep 2007
Posts: 16
09-18-2007 15:38
Hi

I do a script which ask to an user which landmak he want with a llDialog.

Why my landmark is not send ? is it besauce I send the landmark in the listen event?

integer channel = 1000;
list malist = [];

key cle;
integer num = 0;
string message;

default
{

state_entry()
{
//permet d'écouter sur le cannal 1000
llListen(channel,"", "","";);


}

touch_start(integer total_number)
{
malist = [];
message = "";

num = llGetInventoryNumber(INVENTORY_LANDMARK);

if(num > 0)
{
integer a;

for(a = 0; a < num; a ++)
{
malist += llGetInventoryName(INVENTORY_LANDMARK,a);



}

//fait apparaitre une boite de dialogue
llDialog(llDetectedKey(0),"Choose your option.",
malist,channel);
}


}

//écoute du cannal
listen(integer chan, string name, key id, string mes)
{
llSay(0,"you chose this landmark : " + mes);

message = mes;
//donne l'objet
llGiveInventory(llDetectedKey(0),mes);


}



}


thanks
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
09-18-2007 15:48
Try changing this:

llGiveInventory(llDetectedKey(0),mes);

To this:

llGiveInventory(id,mes);
Tony21 Jonesford
Registered User
Join date: 17 Sep 2007
Posts: 16
09-18-2007 16:09
thanks

your answer help me in others script too