2000 Nissan Maxima

Hello, I have recently bought a 2000 Nissan Maxima. The “check engine” light is on and I am unable to figure out why. I have taken the car to the local advance auto parts to get a code reading, but when they plugged in the code reader it didn’t seem to recognize that it was already plugged in. Another thing I have noticed is that whenever I turn off the engine the trip meter resets to zero and if the AC was running before I turn the engine off, it doesn’t come back on when I start the engine again. Also, the clock doesn’t work. I am assuming the same problem is behind all of these issues. Does anyone have any idea what could be causing this? Please give me some suggestions.