In the King James, Prov. 18:24 reads "A man that hath friends must shew himself friendly: and there is a friend that sticketh closer than a brother." This appears to be an admonition for the reader to be friendly: in order to have friends, one must be friendly.
In the ESV, Prov. 18:24 reads "A man of many companions may come to ruin, but there is a friend who sticks closer than a brother." This seems to be a warning against having too many friends.
How should the reader understand these two translations? Is there a contradiction presented here? What causes the man of many companions to come into ruin?