I had a card do that for me after taking the pictures off it (Giving me a Card Error message and would not work with it). Do a quick format of the card in a computer, then hopefully the camera detects it.
If it does detect it correctly, give the card a reformat in the camera, just to be sure.
If it still has errors, the card is defective and needed to be repaired/replaced. Most major brands have a good warranty on them.