Jump to content

Just a little help please


kawolf
 Share

You are about to reply to a thread that has been inactive for 1727 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all,

am having a problem with the following script it detects the name of the avi and says it ok.

but at the give object part

even tho its said the name above it still gives error message
        llGiveInventory: Can't parse destination key 'avi name'

I've also tried it using id2=Detectedkey(0)

any help would be appreciated

 

integer score;
integer CHANNEL = -1234567890;
string id2;
default
{
    touch_start(integer num_detected)
    {
        id2=llDetectedName(0);
        llSay(0,id2);//say name of avi using this line to check it worked
        score = 0;
     

  llListen(CHANNEL,"", NULL_KEY, "");
    }    
      
       listen(integer CHANNEL, string name, key id, string message) //lISTENS TO A DIFFERENT SCRIPT HERE
 {
     if ( message == "hit")
        {
         score=score+1;
          }
     if (score == 5)
     
{
  

 llSay(0,"THATS THE LOT");
   
        integer randomIndex = llGetInventoryNumber(INVENTORY_OBJECT);
        //  random >> [0.0, max)
        randomIndex = (integer)llFrand(randomIndex);
        string itemName = llGetInventoryName(INVENTORY_OBJECT, randomIndex);
  
        llSay(0, id2);even tho its said the name above
       

        llGiveInventory(id2, itemName);//it still gives error message  llGiveInventory: Can't parse destination key 'avi name' here
       

         llSay(0,"Giving");
          
    }
}} //END

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1727 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...