Mistakes will always be made in French, and now you can learn from them.
Wrong: J'ai lui dit
Right: Je lui ai dit
Explanation: When you have a direct or indirect object in French, it has to precede the verb: Je lui dis (I'm telling him.) When the verb is in the passé composé or another compound tense, the object has to precede the helping verb (avoir or être). So the correct way to say "I told him" isn't "j'ai lui dit," but rather je lui ai dit. Likewise, "I saw it" is je l'ai vu, not "j'ai le vu."
Direct and indirect objects