If you have it wired as stated in my last post then you will set the inverting for that end stop to false. Like it says at line 821.

I do not know why you get the failed to enable bed leveling message. I think that suggests problems with the way you have your Z probe and/or ABL settings configured. Or maybe that message is just because of the end stop problem?