`RelationshipManager' does not contain a definition for `Instance'Fixed

Hi,
thx for the plugin!

Something was changed today, therfore you have to update your code.

With regards

It is needed to change this:

//"RelationshipManager.Instance" changed to "RelationshipManager.ServerInstance" //Line 1548-1550 RelationshipManager.ServerInstance.playerToTeam.Remove(player.userID); 
player.ClearTeam(); 
RelationshipManager.PlayerTeam team = RelationshipManager.ServerInstance.CreateTeam();

 

0p7JtLBLJn4psme.jpg N0u53

It is needed to change this:

//"RelationshipManager.Instance" changed to "RelationshipManager.ServerInstance" //Line 1548-1550 RelationshipManager.ServerInstance.playerToTeam.Remove(player.userID); 
player.ClearTeam(); 
RelationshipManager.PlayerTeam team = RelationshipManager.ServerInstance.CreateTeam();

 

Hi there, this happened at a bad time as I'm away from home for atleast a day. I will attempt to patch using this code. Thank you!



Merged post

Just patched this using your code. Thanks!

still getting it with update

Unable to load RustyCuffs. RustyCuffs.cs(1551,33): error CS0117: `RelationshipManager' does not contain a definition for `Instance'​
6JjdxNwGgIQK9u7.jpg RevolvingDCON

Hi there, this happened at a bad time as I'm away from home for atleast a day. I will attempt to patch using this code. Thank you!



Merged post

Just patched this using your code. Thanks!
sSA6JUhGd8NW8Mv.png NooBlet

still getting it with update

Unable to load RustyCuffs. RustyCuffs.cs(1551,33): error CS0117: `RelationshipManager' does not contain a definition for `Instance'​

Crap, my bad. In my post I didn't posed line 1548:


Here now the full file (I hope it works)
//EDIT only the snippet, full file is to long ;-)

private BaseEntity CreateBot(Vector3 pos){
            var player = GameManager.server.CreateEntity("assets/prefabs/player/player.prefab",pos).ToPlayer();
            
            player.Spawn();

            RelationshipManager.ServerInstance.playerToTeam.Remove(player.userID);
            player.ClearTeam();     
            RelationshipManager.PlayerTeam team = RelationshipManager.ServerInstance.CreateTeam();
            RelationshipManager.PlayerTeam playerTeam = team;
            playerTeam.teamLeader = player.userID;

            if (!playerTeam.AddPlayer(player))
            {
                player.currentTeam = playerTeam.teamID;
                playerTeam.members.Add(player.userID);
                player.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
            }


            return player;
        }
0p7JtLBLJn4psme.jpg N0u53

Crap, my bad. In my post I didn't posed line 1548:

Here now the full file (I hope it works)
//EDIT only the snippet, full file is to long ;-)

private BaseEntity CreateBot(Vector3 pos){
            var player = GameManager.server.CreateEntity("assets/prefabs/player/player.prefab",pos).ToPlayer();
            
            player.Spawn();

            RelationshipManager.ServerInstance.playerToTeam.Remove(player.userID);
            player.ClearTeam();     
            RelationshipManager.PlayerTeam team = RelationshipManager.ServerInstance.CreateTeam();
            RelationshipManager.PlayerTeam playerTeam = team;
            playerTeam.teamLeader = player.userID;

            if (!playerTeam.AddPlayer(player))
            {
                player.currentTeam = playerTeam.teamID;
                playerTeam.members.Add(player.userID);
                player.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
            }


            return player;
        }

Pushing this now. Thanks!

Locked automatically