Hi, I'm Pete. Welcome to JustAnswer! I'm reviewing your question now, and will post back with your reply ASAP.
If the lens was not securely connected or if moisture got into the lens or camera it could have caused this problem.
Remove the lens and clean the contacts on both the lens and the camera body ,then firmly reattach the lens and all should be good again.