I've had my camera for a few years now. I just received a couple new lenses for my Nikon D3100 (which I take extremely good care of). For both of the lenses you need to use a T-Mount. When I put the T-Mount on my camera body with the lens it says that there is no lens attached. This has never happened before. Why would it be saying that? (The new lenses are the Bower 500mm preset telephoto lens and the Vivitar 2x Professional Multiplier. The T-Mount is by Vivitar as well.)
The reason your camera is saying there is no lens attached is because the T-mount does not allow any communication between the camera and lens. To use those lenses you must have your D3100 in both manual exposure and manual focus mode. Since there is no "release shutter without lens" option in the camera's menu, you may not be able to use theses lenses at all. For more, see page 169 of the D3100 User Manual. I was able to successfully release the shutter without a lens (in manual focus and exposure modes) on a Nikon D50 I recently repaired for a friend.
Additionally, in camera metering will probably not be accurate. Even if you manually set the aperture in-camera to the aperture of the lens, the camera is going to "assume" the lens is "wide open" when metering and only stopped down when the shutter release is pressed. If the camera has no value to use for "wide open" it will not meter correctly.