Hashtable Sync issue (pun2) Please help me ;)

Options
the problem i have is highlighted in italic:
am i right in saying each player has an individual player.customperperties and that i can access there saved values though the Player in the playerlist? (please shed some light/ help) thank you so much.
(//Called on a scene object that every player has in their scene. )
declaring hashtables as photonhash:
using Hashtable = ExitGames.Client.Photon.Hashtable;

the defined hashtable:
Hashtable CustomHash = new ExitGames.Client.Photon.Hashtable();

in my Start() method:
CustomHash.Add("Red",0);                                           
        CustomHash.Add("Blue",0);
        CustomHash.Add("Ready",0);
        PhotonNetwork.LocalPlayer.SetCustomProperties(CustomHash);
        PhotonNetwork.LocalPlayer.CustomProperties = CustomHash;
        checkteams();
       
       // used after checking teams to assign the player to the team with least players
        if(Blue <= red) { TeamSelection(1); }   
        if(red < Blue) { TeamSelection(2); }

public void CheckTeams()
     {
        if (!GameStarted)
       {
            red = 0;
            Blue = 0;
            PlayersReady = 0;
            BluePlayers_Text.text = "";
            RedPlayers_Text.text = "";
            foreach (Player player in PhotonNetwork.PlayerList)
            {
                [i]Hashtable h = player.CustomProperties;  <---------------------------------------------
                //values are not being fetched here or there not being set in start on the clients. 
                string s = "";
                int R = (int)h["Red"];
                int B = (int)h["Blue"];
                int ready = (int)h["Ready"];[/i]
                if (R == 1)
                {
                    red++;
                    if (ready == 0) { s = ""; }
                    else if (ready == 1) { PlayersReady++; s = " (Ready)"; }
                    RedPlayers_Text.text = RedPlayers_Text.text.ToString() + player.NickName.ToString() + s.ToString() + "\n";
                    return;
                }
                if (B == 1)
                {
                    Blue++;
                    if (ready == 0) { s = ""; }
                    else if (ready == 1) { PlayersReady++; s = " (Ready)"; }
                    BluePlayers_Text.text = BluePlayers_Text.text.ToString() + player.NickName.ToString() + s.ToString() + "\n";
                    return;
                }
            }
         }
      }

Comments