I wrote a little menu-driven landmark giver, which just refuses to work. I have tried both varieties of naming the landmark in llGiveInventory, and neither work, yet on their own within a touch-event (without the menu) they work fine. The strange thing is, if I rename the name of the landmark in the script (to something like 'Sweya' it DOES raise an error to say it can't find it, and doesn't raise an error when spelt correctly, so why (if it can find it) does it not give it? Can anyone see where I am going wrong here?
TIA
Rock
CODE
integer channel = 4913;
default
{
state_entry()
{
llListen(channel, "", NULL_KEY, "");
llSetText("Full?\nClick me", <0.9,0.7,0.586>, 1);
}
touch_start(integer total_number)
{
llDialog(llDetectedKey(0), "If we are full then IM Ryuu Rosca, Rock Vacirca, or Rock Ryder, and we will be pleased to let you know when a SkyHome becomes available so we can arrange a viewing for you.\n\nOr why not visit our associate sim of Swey with its beautiful SkyHomes in a tropical setting.", [ "Landmark"], channel);
}
//The name of the landmark in the Contents is 'Swey'
listen(integer channel, string name, key id, string message)
{
if (message == "Landmark")
{
//llGiveInventory(llDetectedKey(0), "Swey");
llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_LANDMARK, 0));
}
else
{
llSay(0, message);
}
}
}

; // <-- dont put in state_entry if you can help it, use a handle so we can remove it later.