Mac, this could be caused by the sensor not realizing that the flash head is up. To see if that is the problem, place your camera into Auto mode and half-way depress the shutter in a situation where flash would be required. The Flash head should pop up. Release the shutter and after a while depress it half way again. The camera should make a clicking noise like it is going to release the flash head. If the flash position sensor is broken or malfunctioning it does not recognize that the flash is up, therefore it may not fire the flash since it assumes the light was down. Check for the switch inside your camera flash to make sure it is making contact appropriately. there is a great write-up about that on here. and some great information "remove the 2 screws from the front of the popup flash The rear plastic cover will the clip off.
Inside you will find a small switch on the right side of the flash unit when it pops up the switch should make, if it doesn't try shorting it with a small insulated item the try the camera in low light and see if if flashes.
To fix you need to remove the spring-screw from the other side then gently pry the bracket off, then just pull out the small white sleeve on the right hand side of the popup near the switch, this sleeve moves in slightly and will not make the switch on the popup flash.
Gently put the flash bracket onto the camera, be very gentle as the wires are very thin. You will see the white plastic bearing has 2 small clips which need to be through the hole on the bracket the pin which activates the switch will then be in the correct position." on here. Whatever you do, make sure you discharge the condenser, getting zapped on your camera could be a hair raising experience. Hope this helps, good luck.
Yes that worked for my D70s. I managed to prize the little white plastic sleeve out till the sprung clips locked onto the flip up body with a tiny spade screw driver. Once it got level to the hole I slipped another little screw driver between it and the black flip up body. levering it out pivoting on the screw driver shaft and into the opposite inside of the white plastic sleeve.