Welcome to the Pentax Forums!
The most likely cause of your problem is moisture intrusion. The camera's seals will resist both water and dust, but given enough time in heavy rain and/or a poorly-closed flap and water may make its way into the camera. The conventional emergency treatment is:
- Remove batteries from camera (important)
- Remove lens to allow air circulation
- Open all flaps and doors
- Remove SD Card
- Dab off any obvious water inside camera or compartments
- Put camera in a large plastic bag with desiccant packs or similar
With time the camera should dry out with (hopefully) little or no damage to the electronics. Removing the battery is critical. If desiccant packs are not available, some users have had good luck with uncooked rice, frequently changed. Your lens will probably require similar treatment.
I am sure other users will add their advice.
Steve