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

C++ Cast system, few errors in compilation, like "get_io_service" - tfs 1.5

ForgottenNot

Member
Joined
Feb 10, 2023
Messages
192
Reaction score
19
Hello

I'm adding cast system from djrek i know it has it's errors but i want to check it anyways. im stuck with few compilers errors like :

Code:
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\connection.cpp(309,9): error C2039: "get_io_service": no es un miembro de "boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::any_io_executor>"
which is located at connection.cpp
Lua:
void Connection::dispatchBroadcastMessage(const OutputMessage_ptr& msg)
{
    auto msgCopy = OutputMessagePool::getOutputMessage();
    msgCopy->append(msg);
    socket.get_io_service().dispatch(std::bind(&Connection::broadcastMessage, shared_from_this(), msgCopy));
}
and these 5 errors or warnings
Code:
>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolgamebase.cpp(246,76): warning C4100: 'broadcast': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolgamebase.cpp(246,66): warning C4100: 'msg': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,129): warning C4100: 'version': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,110): warning C4100: 'password': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,80): warning C4100: 'accountId': unreferenced formal parameter
1>protocolspectactor.cpp
1>quests.cpp
1>raids.cpp
1>rsa.cpp
1>scheduler.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolspectactor.cpp(243,115): error C2065: 'accountId': identificador no declarado

can be found located at protocolgamebase.cpp
Code:
void ProtocolGameBase::writeToOutputBuffer(const NetworkMessage& msg, bool broadcast)
{
}
and in here:
Code:
void ProtocolLogin::addWorldInfo(OutputMessage_ptr& output, const std::string& accountId, const std::string& password, uint16_t version, bool isLiveCastLogin /*=false*/)
{
    const std::string& motd = g_config.getString(ConfigManager::MOTD);
    if (!motd.empty()) {
        //Add MOTD
        output->addByte(0x14);

        std::ostringstream ss;
        ss << g_game.getMotdNum() << "\n" << motd;
        output->addString(ss.str());
    }

    //Add session key
    //output->addByte(0x28);
    //output->addString(accountName + "\n" + password);

    //Add char list
    output->addByte(0x64);

    output->addByte(1); // number of worlds

    output->addByte(0); // world id
    output->addString(g_config.getString(ConfigManager::SERVER_NAME));
    output->addString(g_config.getString(ConfigManager::IP));

    if (isLiveCastLogin) {
        output->add<uint16_t>(g_config.getNumber(ConfigManager::LIVE_CAST_PORT));
    }
    else {
        output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
    }
    output->addByte(0);
}
Lua:
Operación Recompilar iniciada...
1>------ Operación Recompilar todo iniciada: proyecto: theforgottenserver, configuración: Release x64 ------
1>otpch.cpp
1>actions.cpp
1>ban.cpp
1>baseevents.cpp
1>bed.cpp
1>chat.cpp
1>combat.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\combat.cpp(573,52): warning C4100: 'spectators': unreferenced formal parameter
1>condition.cpp
1>configmanager.cpp
1>connection.cpp
1>container.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\connection.cpp(309,9): error C2039: "get_io_service": is not member of "boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::any_io_executor>"
1>C:\vcpkg\installed\x64-windows\include\boost\asio\ip\tcp.hpp(83,11): message : vea la declaración de 'boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::any_io_executor>'
1>creature.cpp
1>creatureevent.cpp
1>cylinder.cpp
1>database.cpp
1>databasemanager.cpp
1>databasetasks.cpp
1>depotchest.cpp
1>depotlocker.cpp
1>events.cpp
1>fileloader.cpp
1>game.cpp
1>globalevent.cpp
1>groups.cpp
1>guild.cpp
1>house.cpp
1>housetile.cpp
1>inbox.cpp
1>iologindata.cpp
1>iomap.cpp
1>iomapserialize.cpp
1>iomarket.cpp
1>item.cpp
1>items.cpp
1>luascript.cpp
1>mailbox.cpp
1>map.cpp
1>monster.cpp
1>monsters.cpp
1>mounts.cpp
1>movement.cpp
1>networkmessage.cpp
1>npc.cpp
1>otserv.cpp
1>outfit.cpp
1>outputmessage.cpp
1>party.cpp
1>player.cpp
1>position.cpp
1>protocol.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\otserv.cpp(359,54): warning C4242: 'argumento': conversión de 'int32_t' a 'uint16_t'; posible pérdida de datos
1>protocolgame.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\player.cpp(1223,12): warning C4189: 'currentMountId': la variable local se ha inicializado pero no se hace referencia a ella
1>protocolgamebase.cpp
1>protocollogin.cpp
1>protocolold.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolgamebase.cpp(246,76): warning C4100: 'broadcast': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolgamebase.cpp(246,66): warning C4100: 'msg': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,129): warning C4100: 'version': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,110): warning C4100: 'password': unreferenced formal parameter
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocollogin.cpp(70,80): warning C4100: 'accountId': unreferenced formal parameter
1>protocolspectactor.cpp
1>quests.cpp
1>raids.cpp
1>rsa.cpp
1>scheduler.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\protocolspectactor.cpp(243,115): error C2065: 'accountId': identificador no declarado
1>script.cpp
1>scriptmanager.cpp
1>server.cpp
1>signals.cpp
1>spawn.cpp
1>spells.cpp
1>storeinbox.cpp
1>protocolstatus.cpp
1>talkaction.cpp
1>tasks.cpp
1>teleport.cpp
1>thing.cpp
1>tile.cpp
1>tools.cpp
1>trashholder.cpp
1>vocation.cpp
1>weapons.cpp
1>C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\src\tile.cpp(1121,29): warning C4245: 'argumento': conversión de 'int' en 'uint16_t'; no coinciden signed/unsigned
1>wildcardtree.cpp
1>xtea.cpp
1>Compilación del proyecto "theforgottenserver.vcxproj" terminada -- ERROR.
========== Recompilar todo: 0 correcto, 1 con errores, 0 omitido ===========
========= Recompilar se inició en 12:57 AM y tomó 01:14.059 minutos ==========
could you help me please?, thanks
 
Last edited:
Its better found a good programmer to implement this feature instead by your own hands if you dont know how handle this errors, Why? well remember not all cast systems are crash free / ready to run.
 
Back
Top