Jump to content

Info board menu


Tattooshop
 Share

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

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

Recommended Posts

Hello! I'm working on a simple info board menu that allows to any avatar to choose which object / notecard / landmark to receive. How to make that if the chosen item is missing, it does not give an error "Unable to give inventory: 'No item named "" but produce a message in chat like "sorry this item is missing". :D

 

Edited by Tattooshop
Link to comment
Share on other sites

47 minutes ago, Mollymews said:

test that the named item exists with llGetInventoryType before trying to give it


key thisperson = ... some avatar uuid ... ;
string thisthing = "A THING";
if (llGetInventoryType(thisthing) != INVENTORY_NONE)
   llGiveInventory(thisperson, thisthing);

http://wiki.secondlife.com/wiki/LlGetInventoryType

Thank you very much! It works now! :)

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1428 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...