Was the switch in question, attached to any sort of back box, or was a back box used? if not, and you tried screwing the switch directly into the building fabric the connections may have become in contact with some damp brickwork or plaster, without actually seeing what has been attempted, it's hard to say exactly what you have done, can you post a picture of the finished work or your attempt at it? this may highlight the problem.