• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient ping problem- ERROR: got an invalid ping from server

Jessica92

New Member
Joined
Mar 24, 2018
Messages
6
Reaction score
2
I've just started to learn OTC and I'm now stuck at something new.

I'm using TFS 1.1 sources for an 8.0-8.1 OT.
I've managed to make the OTC to show ping (even thou it wasn't in 8.0~).

I've added the codes in the TFS sources for ping, taken from the official 10.97 sources.
protocolgame.cpp (TFS)
C++:
        case 0x1D: addGameTask(&Game::playerReceivePingBack, player->getID()); break;
        case 0x1E: addGameTask(&Game::playerReceivePing, player->getID()); break;

My issue now is that the ping in OTC is obviously wrong, showing 5-50 ms ping, on a local server.
I get a terminal error in OTC. ERROR: got an invalid ping from server
And every 1-2 minutes I'm getting kicked from the game.

I've tried to follow the codes to understand them, however I'm failing at that.
game.cpp (OTC)
C++:
void Game::processPingBack()
{
    m_pingReceived++;

    if(m_pingReceived == m_pingSent)
        m_ping = m_pingTimer.elapsed_millis();
    else
        g_logger.error("got an invalid ping from server");

    g_lua.callGlobalField("g_game", "onPingBack", m_ping);

    m_pingEvent = g_dispatcher.scheduleEvent([this] {
        g_game.ping();
    }, m_pingDelay);
}

So please, why is the problem occurring and how do I prevent it?

got any clues on this are? @gugu15 @margoh
 
Last edited:
protocol?
anyway if you are using a version under 9.54 the server wont support ping system so you'll have to add it yourself
to do that just compare your files with some sources that handle versions above 10.x and copy paste those codes lines related to ping to your source files

i hope its help you

king regards
 
thank you @Felipe93 , but i found the problem
i used de "hack" option to solve client problems, located on gamelib/game.lua, i changed 760 to 772, and it started with ping problems
but, if leave it 760, my client gets a lot of bugs, characters disappear, black screens, etc


[C++]: ProtocolGame::getMappedThing
ERROR: no thing
at:
[C++]: ProtocolGame::parseTileRemoveThing
ERROR: ProtocolGame parse message exception (19 bytes unread, last opcode is 106, prev opcode is 108): unable to create item with invalid id 18689
ERROR: no thing at pos:32104 32204 8, stackpos:1
at:
 
but you didn't do anything that i've menthioned.....lol
otherwhise delete your bugged ping/pong system from your system and just use ruth method
you have to delete things via server and client "de hack"? what king of tool is that btw?
also i never saw a tfs 1.2 7.60 probably its bugged as fuck bro
delete ping / receive ping /pingback /lastping / pong etc
 
Back
Top