Can drugs effect infertility ?

Aaliyah
I use to be on drugs , I smoked weed still do , I was taking xanax bars dilaudid nrocos vicoden and I experienced with cocaine a little bit . could this be then reason why ? I was talking to my ob she said im alright but am I really ? I've been trying to get pregnant for 10 months and ovw stopped taking pills about 7 months ago . any comments helps .