not sure if you're saving their old inventory or not. but it might be easier to clear their inventory then only add the items you want instead of having to loop through all the slots with nothing in them..
Hmmm... Interesting. I'm going to play around with that idea; seems like it would be much easier. Thanks!