haveit = 0;
itemcount = 0;
for (i = 0; i < 8; i += 1)
{
if (global.item[i] == argument0)
haveit = 1;
itemcount += 1;
}