How to sort TArray c++

Pretty straight forward, but I can’t get the signature right and the compile errors are really not useful:

I’m in my game state, I’m creating a function that sorts and returns the base ‘PlayerArray’ (TArray).

How do I write a sort delegate that can cast to my custom player state, and compare player scores?

See https://answers.unrealengine.com/questions/410895/how-to-order-aactor-by-distance-using-tarraysort.html