The problem @sau_152mm had was caused by additional custom code he had added on the page. So it shouldn’t be related to your issue although you get a similar error message. I suspect in your case you simply need to make sure your menu HTML structure is valid – e.g. make sure opened <li> tags are closed properly, all tags are properly nested, etc.
If you can’t cope on your own, please post an URL to some kind of live demo and I will check it at first chance.