How to use the PlayerNumbering script?

Carroto
✭
Hi guys, I'm still learning PUN 2 and facing a problem I can't solve.
I've tried to use the PlayerNumbring script but it always gives me an error that I don't know how to solve
public static int GetPlayerNumber(this Player player)
It gives me an error in SpawnPlayers :
public class SpawnPlayers : MonoBehaviourPunCallbacks
It says "Extension method must be defined in a non-generic static class"
Can any one help?
0