Quote from: Cassiebsg on Sat 17/07/2021 19:54:16
Try using the name of your inventory window instead.
Okay, that was definitely the problem and this is working but I still can't make it lose the item with the property. This will make the player lose items 1-9. I know I'm missing something obvious here but I sure can't see it.
for (int i = 0; i < invCustom.ItemCount; i++) {
if (inventory[i].GetProperty("Cooking")==true){
player.LoseInventory(inventory[i]);
}
}
EDIT:
Okay, one obvious thing I was missing was that I had the property set to true for every inventory item. When I switch it to the appropriate items: inventory[14] through inventory[18] it gets rid of inventory[14] and inventory[15] which baffles me even further.