SyncVar gives the error Failure generating network code

It seems that all tutorials and even the unity documentation are out of date because SycVars for me are not working as demonstrated by them. I have the script ClientManager:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class ClientManager : NetworkBehaviour {

	public static int numOfConnectedClients;

	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {

Here is a picture of the error (In the bottom left hand corner):

If I comment out the [SyncVar], the error stops, so it is definately the culprit.

Are SyncVars unuseable now? If so what’s the alternative to make sure all clients are informed of the change of a specific variable?

So apparently it has to do with the fact that SyncVars cannot be public or static among other rules, the full list of these rules can be found here under Serialization rules. Because of this, if other scripts want to access the information, I would have to use an accessor, which is pretty easy, there is a tutorial on Unity learn in the scripting category, I believe the video is called properties, should be in the intermediate section of scripting in the tutorial section on unity learn (which you can just google). As for the static part, if I desperately needed it to act as a static variable, I could have a separate static variable where whenever one of them changed the other would have to change as well or something similar to that.