Check engine light flashing. Car running rough smells like something burning. on 1999 Mercury Sable

My car has been running rough but when it gets warm it evend out. The check engine was on. Now it is flashing and the car shut off. It crank right back up but it is running very rough and smells like something is burning. We were told before that we needed the bank one sensor two oxygen sensor. what could be wrong?

Asked by for the 1999 Mercury Sable
scan test it for codes
1 more answer
I had the same thing and the engine code gave that one of the cylinders was misfiring. I'm having the spark plugs changed and the rest checked out. Don't be surprised if the repair cost is around $200+