|
Jasline Ashdene
Registered User
Join date: 22 Oct 2008
Posts: 6
|
12-21-2008 19:29
Hi all, this code below does not give out inventory clothings when questions are answer correctly. Can anyone tell me where gone wrong? integer channel = 1000; default { state_entry() { llListen(channel,"", "",""  ; } touch_start(integer total_number) { llDialog(llDetectedKey(0), "Whats is the English Requirement for CMM", ["Grade 1-3", "Grade 1-6", "Grade 1-4"], channel); } listen(integer _chan, string _name, key _id, string _option) { if ("Grade 1-3"==_option) { llSay(0,_name + " You are correct"  ; llGiveInventory(llDetectedKey(0),"MP02"  ; } else { llSay(0,_name + " You are wrong, Please Try again!"  ; } } }
|
|
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
|
12-21-2008 22:50
llDetectKey() doesn't work in listen() event. Change the line: //llGiveInventory(llDetectedKey(0),"MP02"  ; llGiveInventory(_id, "MP02"  ;
|
|
Jasline Ashdene
Registered User
Join date: 22 Oct 2008
Posts: 6
|
12-22-2008 02:09
Thanks so much!!!!
|