Need help over teamviewer, for a Mini error i get from my GM script in my u mmorpg ;p

As the title say it all,

I have a small error, i don’t understand it… and im bored, i want this script to works in my mmorpg…
hahaha.

There’s it:

Keyword void cannot be used in this context.

i think it’s this line:

// handshake: character selection //////////////////////////////////////////
        void OnClientCharactersAvailable(NetworkMessage netMsg) {
        charactersAvailableMsg = netMsg.ReadMessage<CharactersAvailableMsg>();
        print("characters available:" + charactersAvailableMsg.characters.Length);

        // addon system hooks
        Utils.InvokeMany(typeof(NetworkManagerMMO), this, "OnClientCharactersAvailable_", charactersAvailableMsg);
    }

    // called after the client calls ClientScene.AddPlayer with a msg parameter
     void OnServerAddPlayer(NetworkConnection conn, short playerControllerId, NetworkReader extraMsg) {
        print("OnServerAddPlayer extra");
        if (extraMsg != null) {
            // only while in lobby (aka after handshake and not ingame)
            if (lobby.ContainsKey(conn)) {
                // read the index and find the n-th character
                // (only if we know that he is not ingame, otherwise lobby has
                //  no netMsg.conn key)
                CharacterSelectMsg message = extraMsg.ReadMessage<CharacterSelectMsg>();
                string account = lobby[conn];
                List<string> characters = Database.CharactersForAccount(account);

                // validate index
                if (0 <= message.index && message.index < characters.Count) {
                    print(account + " selected player " + characters[message.index]);

                    // load character data
                    GameObject go = Database.CharacterLoad(characters[message.index], GetPlayerClasses());

                    // add to client
                    NetworkServer.AddPlayerForConnection(conn, go, playerControllerId);

                    // addon system hooks
                    Utils.InvokeMany(typeof(NetworkManagerMMO), this, "OnServerAddPlayer_", account, go, conn, message);

                    // remove from lobby
                    lobby.Remove(conn);
                } else {
                    print("invalid character index: " + account + " " + message.index);
                    ClientSendPopup(conn, "invalid character index", false);
                }
            } else {
                print("AddPlayer: not in lobby" + conn);
                ClientSendPopup(conn, "AddPlayer: not in lobby", true);
            }
        } else {
            print("missing extraMessageReader");
            ClientSendPopup(conn, "missing parameter", true);
        }
    }

If someone could help me i’ll be so happy, Thanks all !

This means you have used the keyword “void” like in line 2 of your code snipped when the compiler did not expect it.
In the moste cases you have a missing bracket in front the the error line so the you are opening a new function before closing the previous one.

Wrong:

public class Democalss : MonoBehaviour
{
    void FunctionA()
    {
    void FunctionB()
    {

    }
    }
}

Correct:

public class Democalss : MonoBehaviour
{
    void FunctionA()
    {

    }
    void FunctionB()
    {

    }
}