My check engine light stays on. The obm reads vehicle speed sensor malf. on 1997 Nissan 200SX

I've replaced the sensor,had it reset & the check engine light came back on & the obm still stays there's a speed sensor malf. I was told that the cruise control had stopped working while in use one day and thats when the check engine light originally came on and has been a problem every since. Could the cruise control which does'nt work at all be cuasing my problem? If so, what should i do?

Asked by for the 1997 Nissan 200SX