Hi there! So, you had a save file, were playing it, got an error 12, it crashed without you getting to save and now it's not there?
Have you checked your saves folder for a .backup of that file? Rename the file that has the .backup to remove the ".backup" part of the name and load the game up. So if your game was Sunset Valley.file (I know this isn't the ending of it, but I don't have access to my Sims folder at the moment, so bear with me) there should be another folder called "Sunset Valley.File.backup, just remove the .backup and open up the Sims. Hopefully that should bring back your file.
If you are able to get your file up, save often and "Save As" often with a new name. Like SunsetValley1, SunsetValley2. I encourage people to avoid spaces in their save names, as that has been linked to having issues with the error 12, also try to avoid going for long stretches of Sim time without saving! Happy Simming, let me know if that helps!