points to be noted on Event receivers in SharePoint 2013
properties.ErrorMessage is used for showing error in event handlers
properties.ListItem.Updateoverwriteversion() is used to overwrite version in list item, rather than adding a new version to the item it overwrites the existing one.
this.EventFiringEnable = false or True to stop or start the events on a list item, when ever you use "Updateoverwriteversion()" method inside a event we should set "this.EventFiringEnable= True" to stop the recursion
SharePoint 2013 People Picker error: “Sorry, we’re having trouble reaching the server.”
If you see the above error while adding users to a group or to a site there are many resolutions which are out there in internet.
but for me i have tried everything which i seen based on the above error but nothing worked out, finally after extending the web application to new port number and deleting the same, the issue got fixed