The problem is that hash tables don't store items in any specific order (at least, not any order that is relevant or useful to us), and by using the .item property of $hget() you've told mIRC that the item you've given is actually a numeric index rather than an item name.