• 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!

Problem with protocolllogin.lua

ronK12

New Member
Joined
Jun 15, 2018
Messages
2
Reaction score
0
Hi,

I have a problem with protocolllogin. I want to add more informations at characterlist but... when i try to add new line msg:getU32() the client breaks down.

protocollogin.cpp

C++:
 output->AddString((*it));
            if(g_config.getBool(ConfigManager::ON_OR_OFF_CHARLIST))
            {
                if(g_game.getPlayerByName((*it)))
                    output->AddString("Online");
                else
                    output->AddString("Offline");
            }
            else
                output->AddString(g_config.getString(ConfigManager::SERVER_NAME));

            output->AddU32(serverIp);
            output->AddU16(g_config.getNumber(ConfigManager::GAME_PORT));
            output->AddU32(level); // NEW LINE

protcollogin.lua //

Lua:
local charactersCount = msg:getU8()
    for i=1,charactersCount do
      local character = {}
      character.name = msg:getString()
      character.worldName = msg:getString()
      character.worldIp = iptostring(msg:getU32())
      character.worldPort = msg:getU16()
      character.level = msg:getU32() -- NEW LINE

The order agress and i have no idea what is wrong :(
I can change order but i can not add a new line


How work it in this file?

Protocol: 8.54
 
The actual error message would be helpful.
Maybe you have defined __LOGIN_SERVER__, and in that case the part of code that you listed is not even compiled.
If you can reorder those fields in both server and client, and everything is working as expected, then the problem is somewhere else.
 
Back
Top