Okay, I feel like I'm doing something stupid, but I can't find a command to the effect of:
character.HasInventoryItem[iItem]
The closest thing I found to this was a command called character.InventoryQuantity, but when I use it, it gives me this error.
if (player.InventoryQuantity[iLockPick] == 1) { // player has the lock pick?
// do stuff
}
else {
// do other stuff
}
That code doesn't work. It gives the error
Error: Type mismatch: cannot convert 'InventoryItem*' to 'int.'
Is this the right command I'm supposed to be using? If so, how do I fix it?
The problem is that you're using an inventory pointer as an index. What you want to do is:
if (player.InventoryQuantity[iLockPick.ID] == 1) { // player has the lock pick?
Aha. Fixed now. Thank you.