Just found this:
I will have to check if BOTH files are pointing to the correct path. One question though. If I am using advmame rather than mame4all I would change the path in it rather than :
/opt/retropie/emulators/mame4all/mame.cfg ,,which would be for running mame4all
eg:
/opt/retropie/emulators/advmame/mame.cfg ,,assuming that is the correct path to the advmame executable