i've written this script.. but for some reason it do wanna give inentory... i mean.. it works find everything goes as expected... but it does not give inventory... i cant figure out whast seems to be the problem..
so can anyone help me with it.. and explaining the error is highly appreciated...

list gifts = ["Human - Shirt", "Muffin - Shirt", "Cupcake - Shirt"];
string msg = "Please select your gift.";
key ToucherID;
integer channel;
integer listen_id;
default{
state_entry() {
channel = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
}
touch_start(integer total_number) {
llSay(0,"Please note that you have 30 seconds to make your message!"
;
ToucherID = llDetectedKey(0);
llDialog(ToucherID, msg,gifts, channel);
listen_id = llListen( channel, "", ToucherID, ""
;
llSetTimerEvent(30);
}
listen(integer channel, string name, key id, string message) {
if (message == "Human - Shirt"
{
llGiveInventory(llDetectedKey(0),"Human"
;
llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;
}
else if (message == "Muffin - Shirt"
{
llGiveInventory(llDetectedKey(0),"Muffin"
;
llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;
}
else{
llGiveInventory(llDetectedKey(0),"cupcake"
;
llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;
}
llListenRemove(listen_id);
}
timer() { //TIME!
llListenRemove(listen_id);
llWhisper(0, "We are sorry, you took too long to select your gift"
;
llResetScript();
}
}
string msg = "Please select your gift.";
key ToucherID;
integer channel;
integer listen_id;
default{
state_entry() {
channel = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
}
touch_start(integer total_number) {
llSay(0,"Please note that you have 30 seconds to make your message!"
;ToucherID = llDetectedKey(0);
llDialog(ToucherID, msg,gifts, channel);
listen_id = llListen( channel, "", ToucherID, ""
;llSetTimerEvent(30);
}
listen(integer channel, string name, key id, string message) {
if (message == "Human - Shirt"
{llGiveInventory(llDetectedKey(0),"Human"
;llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;}
else if (message == "Muffin - Shirt"
{llGiveInventory(llDetectedKey(0),"Muffin"
;llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;}
else{
llGiveInventory(llDetectedKey(0),"cupcake"
;llSay(0, "Thank you " + name +", your gift '" + message + "' will be delivered shortly"
;}
llListenRemove(listen_id);
}
timer() { //TIME!
llListenRemove(listen_id);
llWhisper(0, "We are sorry, you took too long to select your gift"
;llResetScript();
}
}