How come my Nikon D-SLR isn't working?
The last time I used the camera, back in August, it worked fine. I tried to take some pictures tonight and it said "lens not attached", despite it making the normal clicking sound. Is this some sort of sensor error?
The best thing to do is take it into your local camera shop (and not an electronics store). They will be familiar with the issue. It could be as simple as a contact cleaning (and they can do it while you wait, if you go during a non busy time (Tuesday-Thursday mornings. Or it may be something more complicated.
Your owners manual may even include a section on contact cleaning.
Have you pulled the lens and cleaned the contacts? Gently and I do mean gently wipe them with a micro fiber cloth or even a Q-tip. Absolutely no liquids of any kind and try again.
Of course there's no reason to mention the model of the camera and the lens.
Clean the contacts, try again