1. I'm currently busy with an addon that inspects the gear from players. For now the only time I get the info is when I inspect the player. Can anyone give me a clue how to do that.

    Thanks in Advanced.

    You have to use the API to inspect the unit, wait for the event indicating the information is available. See NotifyInspect.

    Thanks it's working, I totally oversaw that function. Is there a way to make a pause/wait for 1 sec in an addon?

    Not really, no. that's not how things work. What are you trying to do that makes you think you need that?

    The reason why is because when I target someone or inspect someone, I don't get all the itemlinks. Sometimes I get like 4 to 6, other times I get 9 to 13 on the first time the when I click on someone. On the second time I get all the info of the items, which probably means my addon works faster then the server gives the information.

    I'm using the following code:

     for i=1, 18 do
        iLink = GetInventoryItemLink(unit, i);
        if(iLink ~= nil)then
            iLvl = GetItemLevel(iLink);

    GetItemLevel function is as follow:

     function GetItemLevel(iLink)
        name, link, quality, iLvl, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(iLink);
        if(iLvl == nil)then
            ilvl = 0;
        return iLvl;

    You could use an OnUpdate timer to wait a period of time but that's going to be terribly error prone if potentially many targets could be inspected in a short period of time. What you're trying to do is something that WoW doesn't quite support in an easy to program-for way right now.. anything you do is going to be a hack.. basically.

    You might look at ElitistGroup and see how it accomplishes this for ideas of how programs that are written well can still obtain this information.

    I've looked into the (im)famous gearscore addon, they are basically using the same thing. I'll try to find a solution. Thanks for the tips and all.

    There is a precise reason I suggested ElitistGroup and NOT GearScore. When in doubt, GearScore does it wrong.