Troubles with setting array elem for inventory

Debug the existing return. Add a print string (Item ID).