Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

GIve inventory with menu

Reno Katscher
Registered User
Join date: 2 Jun 2007
Posts: 18
06-07-2008 08:05
Hi all
I am using the menu and menuengine sripts from the library and want to give inventory based on the selection.

I want 3 selections: banana, apple, orange

i have put this if statement in and it compiles and i get the menu, but when i click the banana button i don't get any inventory

if (str=="DEFAULT|Banana";)
{
llGiveInventory(llDetectedKey(0),"Banana";);
llSay(0, "working";);
}


the llSay works..i just stuck that in there to see if the menu was working.

What am i missing? and yes, i have the object named banana in the object and it matches capitalization and spelling in the script and menudefs notecard ;-)
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
06-07-2008 09:48
detectedKey doesn't work in a listen(), use the key passed into the listen() event instead.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-07-2008 11:52
From: Shadow Subagja
detectedKey doesn't work in a listen(), use the key passed into the listen() event instead.

And don't feel bad about that one. This misuse of llDetectedKey(0) has bitten many a scripter before at some point, including myself. But at least you learn after the first time it happens.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Reno Katscher
Registered User
Join date: 2 Jun 2007
Posts: 18
06-08-2008 11:08
Thanks for the info. How do i use the key passed into the listen() event? Pretty new to scirpting...am off to the wiki to see if i can figure this out