1. Code:
    error CS1061: Type `OwnershipStakeServer' does not contain a definition for `ProxyName' and no extension method `ProxyName' of type `OwnershipStakeServer' could be found. Are you missing an assembly reference?
    Help please guys.
    Code:
    private void SetCellNameCommand(PlayerSession player, string command, string[] args)
            {
                OwnershipStakeServer ownershipStakeServer;
                Singleton<ConstructionManager>.Instance.OwnershipCells.TryGetValue(ConstructionManager.GetOwnershipCell(player.WorldPlayerEntity.transform.position), out ownershipStakeServer);
                ownershipStakeServer.TerritoryName = "Garry";
                ownershipStakeServer.ProxyName.text = ownershipStakeServer.TerritoryName;
            }
     
  2. Pretty much what it sounds like there DJDiamonD. You're trying to set some variable called "ProxyName" on the last line, but there isn't a variable with that name. As far as I can tell, there's never been a variable with that name in that class.

    Oh, are you meaning to change affect the ProxyName Text component in OwnershipStakeClient?

    What you need to do is change the TerritoryName value on the server, then invalidate the object so it syncs the proxies. Have a look at OwnershipStakeServer.ChangeTerritoryNameServer() - this does exactly what you want, except you don't want to do the authority check in HasAuthority (or maybe you do?)
     
  3. So. But in InvalidateServer there area some functions, varialbes with "this." prefix. I don't know C# so good. Can you help me?
     
  4. 'this' always stands for the instance of the class the function is located it.
     
  5. Okey guy. I tried to do this:
    Code:
    ownershipStakeServer.RPC("ChangeTerritoryNameServer", uLink.RPCMode.Others, (object) ownershipStakeServer.TerritoryName);
    But it doesn't works and console doesn't give any errors. Can you correct my idea?
     
  6. We've done all the heavy lifting for you. You can just use what's there. Just change the territory name on the server and call OwnershipStakeServer.Invalidate()
     
  7. xD Same error) `OwnershipStakeServer' does not contain a definition for `Invalidate'
     
  8. You called it on an Instance?
    It may be private.
     
  9. No. But need on an Instance? And yes, it is private. How can i call it?
     
  10. Wulf

    Wulf Community Admin

    You'd need to use reflection if it's private.
     
  11. So.. Can you make an example for me for void functions?
    [DOUBLEPOST=1458154747,1458143579][/DOUBLEPOST]
    Thanks guy, but i don't understand really) Maybe i am noob xD Can you make it for private void Instance() that is located in OwnershipStakeServer please.
    [DOUBLEPOST=1458218766][/DOUBLEPOST]UP
     
  12. Wulf

    Wulf Community Admin

    There are a few examples floating around. Ex. Solved - Access private method with C# | Oxide