string not being send to server

so this is one of many revisions here are the facts
the charactername string is being changed to the text that is nameingcharacter.text when i click the button
the string charactername is not sent to the server or synchronized with it.
even through calling the command i still cannot get the variable charactername to sync with the server

how would i edit to the script to ensure when the button calls a method that the variable charactername is sent to the server correctly?

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

public class Name : NetworkBehaviour {
    [SyncVar]
    public string charactername;
    public Text nameingcharacter;
    public InputField entername;
    public GameObject namer;



    public void namecharacter(string Charactername)
    {

        charactername = nameingcharacter.text;

    }

    public void nameis()
    {
        namecharacter(charactername);
        Cmd_charactername(charactername);
    }

    [Command]
    void Cmd_charactername(string charactername)
    {
        namecharacter(charactername);
        Rpc_namecharacter(charactername);
    }

    [ClientRpc]
    void Rpc_namecharacter(string charactername)
    {
        namecharacter(charactername);
    }






    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {
       
    }
}

Your problem at line 19. the server never had the new name because of it.

so I’ve tried configuring the script in some more ways
but it will not change the string charactername on the server

right now the button calls nameis() yes the button is configured correctly

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

public class Name : NetworkBehaviour {
    [SyncVar]
    public string charactername;
    public Text nameingcharacter;
    public InputField entername;
    public GameObject namer;
    public Text namebanner;
    public GameObject externalui;

    public void nameis()
    {
        Cmd_charactername(nameingcharacter.GetComponent<Text>().text);
    }





    [Command]
    void Cmd_charactername(string charactername)
    {
        nameingcharacter.text = charactername;
        Rpc_namecharacter(charactername);
    }

    [ClientRpc]
    void Rpc_namecharacter(string charactername)
    {
        nameingcharacter.text = charactername;

    }






    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {
       
    }
}