I have some basic questions on loading inventory items dynamically.
How do you read parameters in a notecard into a list or other LSL data structure? For example, how do you count the number of inventory items and dynamically store it in a notecard?
These forums are CLOSED. Please visit the new forums HERE
basic questions on dynamic inv content |
|
|
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
|
02-27-2007 02:33
I have some basic questions on loading inventory items dynamically.
How do you read parameters in a notecard into a list or other LSL data structure? For example, how do you count the number of inventory items and dynamically store it in a notecard? |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
02-27-2007 03:51
You cannot write to notecards only read from them.
To read data from a notecard use llGetNotecardLine The data server will hopefully reply via a dataserver event, I say hopefully because you have no control over if or when it will respond. Because of this its good practise to add a timer when you request data so that you can recover should it stall. CODE
Exactly what you do with the data is dependant upon what it contains. |
|
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
|
02-27-2007 19:17
is there a way to use LSL to count the number of inventory items of a certain type (say images)?
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
02-27-2007 21:35
is there a way to use LSL to count the number of inventory items of a certain type (say images)? llGetInventoryNumber(integer type) |
|
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
|
02-28-2007 01:31
thanks!
also, how do you make sure no one (other than creator) can add any more items to the object's inventory? |
|
Woopsy Dazy
Registered User
Join date: 12 Nov 2006
Posts: 173
|
02-28-2007 02:12
llAllowInventoryDrop(FALSE);
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
02-28-2007 10:26
how do you make sure no one (other than creator) can add any more items to the object's inventory? |