Postado Novembro 13, 2016 8 anos [ 1%] Building CXX object CMakeFiles/tfs.dir/src/actions.cpp.o In file included from /root/cast/forgottenserver/src/game.h:31:0, from /root/cast/forgottenserver/src/actions.cpp:26: /root/cast/forgottenserver/src/player.h: In member function ‘bool Player::startLiveCast(const string&)’: /root/cast/forgottenserver/src/player.h:1145:68: error: invalid static_cast from type ‘ProtocolGame_ptr {aka std::shared_ptr<ProtocolGame>}’ to type ‘ProtocolCaster*’ return client != nullptr && static_cast<ProtocolCaster*>(client)->startLiveCast(password); ^ /root/cast/forgottenserver/src/player.h: In member function ‘bool Player::stopLiveCast()’: /root/cast/forgottenserver/src/player.h:1149:68: error: invalid static_cast from type ‘ProtocolGame_ptr {aka std::shared_ptr<ProtocolGame>}’ to type ‘ProtocolCaster*’ return client != nullptr && static_cast<ProtocolCaster*>(client)->stopLiveCast(); ^ /root/cast/forgottenserver/src/player.h: In member function ‘bool Player::isLiveCaster() const’: /root/cast/forgottenserver/src/player.h:1153:68: error: invalid static_cast from type ‘const ProtocolGame_ptr {aka const std::shared_ptr<ProtocolGame>}’ to type ‘ProtocolCaster*’ return client != nullptr && static_cast<ProtocolCaster*>(client)->isLiveCaster(); ^ make[2]: *** [CMakeFiles/tfs.dir/src/actions.cpp.o] Error 1 make[1]: *** [CMakeFiles/tfs.dir/all] Error 2 make: *** [all] Error 2 Alguém sabe me dizer o por que do error? O codigo em questão que está dando problema é esse creio eu... const std::map<uint8_t, OpenContainer>& getOpenContainers() const { return openContainers; } bool startLiveCast(const std::string& password) { return client != nullptr && static_cast<ProtocolCaster*>(client)->startLiveCast(password); } bool stopLiveCast() { return client != nullptr && static_cast<ProtocolCaster*>(client)->stopLiveCast(); } bool isLiveCaster() const { return client != nullptr && static_cast<ProtocolCaster*>(client)->isLiveCaster(); } Engine: Tfs 1.3 @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
Postado Novembro 17, 2016 8 anos provavelmente vc não adicionou os arquivos que contém a classe ProtocolCaster no compilador
Postado Novembro 19, 2016 8 anos Autor Em 17/11/2016 em 08:54, Fir3element disse: provavelmente vc não adicionou os arquivos que contém a classe ProtocolCaster no compilador Sim era isso mesmo, já foi resolvido Obrigado @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.