int ci=0;
unsigned int ci=0;
int ContainerCountItems(const int serial, short id, short color){	int ci=0; 	int total=0;	P_ITEM pi;	unsigned long loopexit=0;	vector<SERIAL> vecContainer = contsp.getData(serial);	for ( ci = 0; ci < vecContainer.size(); ci++)	{		pi = FindItemBySerial(vecContainer[ci]);		if (pi->free)			// just to be sure ;-)			continue;		if (pi->type==1)		// a subcontainer ?		{			total += ContainerCountItems(pi->serial, id, color);			continue;		}		if (pi->id()==id &&			(color==-1 || pi->color()==color))			total += pi->amount;	}	return total;}