happened to me yesterday but luckily i have powersaves and had backed up my file for or/as right before using it, so everything went back to normal. when i had x and y i used powersaves and it completely fucked up my cartridge, my 3ds didn't even read it and this was only about 3 months ago, few weeks before oras came out, to this day my y cart is still fucked up and doesn't get read, but i got a new powersaves and played through oras and stuff, bred from scratch, well not really, had a bunch of mons in pokebank (breeding leftovers from Y) so luckily i didn't have to do everything from complete scratch. tough man, guess you just have to start from the beginning.