Help please guys.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?
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; }
Error when using OwnershipStakeServer
Discussion in 'Hurtworld Development' started by DJDiamonD, Mar 14, 2016.
-
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?) -
-
-
Code:ownershipStakeServer.RPC("ChangeTerritoryNameServer", uLink.RPCMode.Others, (object) ownershipStakeServer.TerritoryName);
-
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()
-
-
It may be private. -
-
Wulf Community Admin
-
[DOUBLEPOST=1458154747,1458143579][/DOUBLEPOST]
[DOUBLEPOST=1458218766][/DOUBLEPOST]UP -
Wulf Community Admin