I have the following if statement:
if (inventory[player.ActiveInventory].ID == GetGameParameter(GP_NUMINVITEMS,0,0,0)) {
However, even though I've called for the item's ID number, I still get the error:
Quote
Type mismatch: cannot convert 'Inventory Item*' to 'int'
Is inventory[player.ActiveInventory].ID not an int?
Hmmm...you appear to be a bit confused about the way things work.
player.ActiveInventory is an InventoryItem* (pointer-to-InventoryItem), not an integer. To get the integer value of this item, you can just type player.ActiveInventory.ID.
You could type inventory[player.ActiveInventory.ID].ID but that's pointlessly redundant.
So, replace that line of code with:
if (player.ActiveInventory.ID == GetGameParameter(GP_NUMINVITEMS,0,0,0)) {
Ahh, thank you. That was the problem.