If you’re having problems with Pokémon codes, turn the Action Replay off before starting the game and then turn it back on during the game. Also, make sure it is turned off while saving. To get the required Pokémon, use the PKM codes, then restart and use the other codes.
If you’re having trouble with the Pokémon codes for Ruby and Sapphire, you need to check the code you entered in. You must enter ALL of the lines of code, and you MUST enter them EXACTLY as they are on the site. If you do not, you get nothing or a Bad Egg, which never hatches.