I have a problem, I was transferring pokemons from pokemon X to pokemon ultra sun with the pkhex and when I finished I wanted to play pokemon X and when I opened the emulator it did not re-recognize my game and the game restarted. How can i get my game back?
In order for us to provide better support, we need to see the log generated by Citra. This guide will walk you through how you can obtain the log file: How to Upload the Log File.
We’re not exactly responsible for what you do with third-party programs. I don’t know what exactly you did, or did not do with PKHeX, so I couldn’t tell you where your save file went or how to recover it. This is why you should always create back ups when editing stuff that contains your progress. I know that doesn’t help you now, but I hope you’ll remember it for the future.
Like @SleepingSnake said, learn from you’re mistake like I did for so many years till now and so on (???), all ways learning from them, so many start over’s from the beginning.