'97 Nissan Sentra will not start up or idle without pressing gas pedal

I just picked up a 1997 Nissan Sentra XE to repair and after running diagnostics I found out the Mass airflow sensor and distributor needed
to be changed.
Now the dianostics shows no errors, but the car still does not start up or idle without pressing the gas pedal.
What could be the issue?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.