You Have To Listen To What The Daycare Guy Says
If he says, "the two prefer to play with other Pokemon more than each other." Then the Pokemon are not compatible. There is a 0% chance of getting an egg.
If he says, "the two don't seem to like each other." Then the Pokemon are compatible. There is about a 20% chance of getting an egg.
If he says, "the two seem to get along." Then the Pokemon are compatible. There is about a 50% chance of getting an egg.
If he says, "the two seem to get along very well!" Then the Pokemon are compatible. There is about a 70% chance of getting an egg.
Remeber, you have to leave them in there for awhile. Talk to the Daycare guy and if he says anything other than, "the two prefer to play with other Pokemon more than each other", there is a chance of an egg. But you have to walk (run, bike, rollerblade, whichever) about 255 steps to get a chance of getting an egg. After you have traveled 255 steps, go back to the Daycare. If the Daycare man is standing outward, he has an egg for you. If not, just travel another 255steps and come back. Remeber, when your traveling, the Daycare has to be off-screen. If you just stand near the Daycare (off-screen even) it won't work.
Hopefully I've helped! :)