My first inclination is to assume that a lens error is the problem itself, but first, there is one more likely possibility, lack of sufficient power. Remove the battery, check the pins or connectors in the battery compartment, and make sure that they are positioned correctly to contact the battery. Then use a q-tip with alcohol to clean and dry them. It is also a known issue that digital cameras circuitry can also become much more sensitive to the lower power level produced, so if you have been using the same rechargeable battery for the life of the camera (more than 3-4 years), yours is around 5+, then the power capacity of the battery may not be high enough anymore to handle the increased load. A new battery may be the answer.
Please keep in mind that my diagnosis & solutions provided are directly dependent on the accuracy of your description of the problem. As with any "do it yourself" fixes, success is a "team effort", since I can't see or touch the camera, and relies on the customer's manual dexterity and ability to follow the instructions well.