if youre breeding the riolu with a ditto, it will not work because riolu as well as other baby pokemon are in the undiscovered egg group and will not make eggs. What you will have to do is make the riolu evolve into lucario then breed it with the ditto then it should make eggs