I have the following code in a single prim:
initialize() {
integer i = 0; // Local Counter
integer textureCount = llGetInventoryNumber(INVENTORY_TEXTURE);
llSay(0, "I contain " + (string)textureCount + " textures."

llSay(0, "I contain " + (string)llGetInventoryNumber(INVENTORY_OBJECT) + " objects."

for (i = 0; i < textureCount; i++) {
string textureName = llGetInventoryName(INVENTORY_TEXTURE, i);
key textureKey = llGetInventoryKey(textureName);
list itemInfo = llCSV2List(textureName);
string currentItemName = llList2String(itemInfo,0);
string currentItemPrice = llList2String(itemInfo,1);
integer inventoryType = llGetInventoryType(currentItemName);
llSay(0, (string)i + " Texture " + textureName + " Key " + (string)textureKey + " Item " + currentItemName + " " + currentItemPrice + " Type " + (string)inventoryType);
}
}
default
{
state_entry() {
initialize();
}
touch_start(integer foo)
{
initialize();
}
}
I have three items in the prim:
Prim1
Prim2
Prim3
and three textures,
Prim1,50
Prim2.50
Prim3,50
Yet, when I execute the script, I get back an inventoryType of -1 indicating the Prim object doesn't exist. Any and all ideas welcome.