Low Beams and Highbeams both went out

Think I fixed my lowbeams. Pulled the carpet up and the plug was loose on the dimmer, and the black wire was coming out of the socket, then one prong broke on the dimmer switch. Went out to my favorite parts car(78 Dodge Sportsman motorhome)pulled the dimmer out and also took the molded plug as it has a base that gets screwed down under the dimmer so the plug cannot work loose unless the screws come out. Also trimmed some of the padding on the Dart carpet around the dimmer and made the dimmer hole bigger as the dimmer was hanging up on the grommet. Sorry I was going to right down the numbers on the motorhome dimmer plug and forgot. I think it is fixed but it seems like sometimes lighting gremlins just pretend to be fixed only to pop up at the worst times.