To get your friend code in Black or White (I have White), you're required to have gone on wi-fi at least once in game, but that part's fairly easy if you got Dream World set up. Anyway, all you have to do is take out your Pal Pad and click on *insert name here*'s Friend Code, and if you've gone onto wi-fi at least once, it'll show you your friend code, or fc for short. Anyway, I hope my short instructions will be of use. Good luck
