error check for out of bounds inventory item use