Lol, why waste your time with ECU codes. Your problem is your air flow meter. r32 skylines are notorious for having shitty ones, you dont need to spend $150 for it lol...u can buy it for around $50 used from anyone (check facebook pages). Get the green label AFM. Before you do however, first turn on the engine, then unplug the air flow meter. If their is no change in idle then thats your problem 100%. Check that your intercooler and intake piping are still connected too, because that can cause the rev limiter issue as well
Also, u need to do the Hicas diagnostic test to determine your other problem. Its f**king easy and it works. When my power steering and speedo stopped working, i did the hicas test myself and found the problem. What you do it put your car in neutral and then turn the key to on, then after one second turn the engine on. Then immediately hook your steering wheel from one side to the other at least 5-10 times while pumping your brakes at the same time. Now look at the hicas light on your cluster. Youll notice it flash. If it flashes once, it means that its working fine. Once you see it flash twice fast, then that implies what the problem is. Look below
1. HICASsolenoid R.H. 2. HICASsolenoid L.H. 3. Cut-off valve 4. Power Steering solenoid 5. Vehicle Speed sensor 6. Steering anglesensor 7. Steering Neutral positon sensor 8. A/T: Parking Brake Sensor M/T: Clutch sensor 9. A/T: Inhibitor sensor M/T: Neutral sensor
i also like to mention that i had the problem of my car randomly turning off while i was driving. It was my battery that just needed charging. It did it like 3-4 times in a couple of weeks. But it may be unrelated to your cause. But maybe just maybe both your AFM and battery have clonked it. Just a suggestion.