#Member is null after initialization

8 messages · Page 1 of 1 (latest)

silk fern
#

As you can see in the picture, the ConnectionConfig is not null. However, after initialization, m_Server says it is null

plush novaBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

#

@silk fern

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

silk fern
#
class GameServer {
public:
    GameServer(const yojimbo::Address& address);

    void ClientConnected(int32_t clientIndex);
    void ClientDisconnected(int32_t clientIndex);

    void Run();
    void Update(float deltaTime);
private:
    std::unique_ptr<GameAdapter> m_Adapter;
    yojimbo::Server m_Server;
    GameConnectionConfig m_ConnectionConfig;
    std::unique_ptr<MessageDispatcher> m_Dispatcher;

    static const uint8_t DEFAULT_PRIVATE_KEY[yojimbo::KeyBytes];
    static const uint32_t MAX_PLAYERS = 64;
    static const uint32_t TICK_RATE = 20;
    static const uint32_t REQUIRED_CLIENT_VERSION = 0;
    ...
silk fern
#

GameConnectionConfig m_ConnectionConfig; should be declared above m_Server

#

!solved