CustomInventory

mycroft

Script Author: MyPrices
I'm writing an additional bit to myprices....trying to place crafted items on the broker without all that clicking and dragging...

I'm playing around with custominventory trying to get the number of specific items on me...

has anyone any ideas why this

Code:
	Me:CreateCustomInventoryArray[nonbankonly]
	if ${Me.CustomInventory["${itemname}"].Quantity} > 0
	{
		echo I have ${Me.CustomInventory["${itemname}"].Quantity} ${itemname} on me
	}
Returns the number of 'charges' for the first item the script finds instead of the number of 'items' in the inventory...
 

Amadeus

The Maestro
Staff member
Yes, because this:
Code:
${Me.CustomInventory["${itemname}"]}
returns an actual item datatype object. 'Quantity' is a datatype member of "item".

You want this:

Code:
${Me.[FONT=Courier New]CustomInventoryArraySize[/FONT]}
 
Top Bottom