Had this camera around 7 years and recently it just won't focus, with the question mark flashing and when I press to see the error it says "Subject is too dark, cannot adjust exposure, use the flash". The shutter release now when held down doesn't result in the camera adjusting the focus so I'm stuck really not able to take photos like I was doing before. I've tried adjusting settings and modes and the lens. Thanks for your replies.
please check if you have accidentally switched the focus mode to MF, both in the i menu and on the lens itself. That could cause the AF disengagement. Also, if you/(someone else who uses the camera) changed the focus mode from shutter button half press to back button autofocus (BBAF), this behaviour would be noticed.
In order to confirm if it is indeed BBAF setting, press the AE-L/AF-L button on the back of your camera and see it it focuses now. If it does, then the issue is BBAF is enabled. just go to settings, controls and reassign what AE-L/AF-L is assigned to. Change it from AF-ON to something else and everything should work like normal.
IF BBAF is not enabled, then try using a different lens and see if the issue is resolved.
Ignore the flash required message for now. First deal with the AF issue and then report back if it has been solved. Once this is done, point the camera in live-view mode at a brightly lit contrasty surface(like a white/yellow car on a black road or a black gate in a white wall) and then try again. Now, the dark scene message should disappear.