So I was sitting at a stop light, when the light turned green and I went to accelerate and the car instantly died and the check engine light came on. Tried to start the car again and it fired up, but then died again when I touched the gas. Ended up pushing the car off the road. Popped the hood to look around and I couldn't see anything wrong. I kept trying to start the car but it would only fire once or twice then die. Finally, I got the car to stay running and limped the car back home. I had to touch the gas very gently and drive slow. If I pushed on the gas to accelerate normally the car's RPM's would immediately drop and the car lost all power and would die unless I let off the gas fast.
I checked codes and I got code 31 and 34. I'm guessing code 34 is from hitting fuel cut a few times, but 31 is for an AFM problem. The car will idle fine now, but if I try to rev it while parked the RPM's seem to only go to about 2k then drop then bounce back up and so forth while I'm holding the gas. Seems like every once in a while when I was revving it it would go above 2k, but not very often. I unplugged the AFM while the car was idling so see if it would have any affect on the car, and the car wasn't affected at all by me unplugging the AFM. I then went to rev it up while it was still unplugged and the car was running the exact same. So would this mean my AFM electronics are bad and not doing anything for the car? I looked over the Connection and couldn't visibly see anything wrong with the wires or plug.