Postado Abril 19, 2022 3 anos protocolgame.cpp: In member function ‘void ProtocolGame::spectate(const string&, const string&)’: protocolgame.cpp:141:27: error: ‘stoi’ is not a member of ‘std’ uint32_t total = ctime - std::stoi(value); ^ protocolgame.cpp:172:35: error: request for member ‘addProtocolToAutosend’ in ‘OutputMessagePool::getInstance()’, which is of pointer type ‘OutputMessagePool*’ (maybe you meant to use ‘->’ ?) OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp:172:74: error: ‘shared_from_this’ was not declared in this scope OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp: In member function ‘bool ProtocolGame::spectatePlayer(const string&, const string&)’: protocolgame.cpp:206:24: error: ‘class Spectators’ has no member named ‘resetOwner’ player_old->client->resetOwner(); ^ protocolgame.cpp:216:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ protocolgame.cpp:229:27: error: ‘stoi’ is not a member of ‘std’ uint32_t total = ctime - std::stoi(value); ^ protocolgame.cpp:258:35: error: request for member ‘addProtocolToAutosend’ in ‘OutputMessagePool::getInstance()’, which is of pointer type ‘OutputMessagePool*’ (maybe you meant to use ‘->’ ?) OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp:258:74: error: ‘shared_from_this’ was not declared in this scope OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp: In member function ‘void ProtocolGame::returnPlayer()’: protocolgame.cpp:273:35: error: ‘getThis’ was not declared in this scope player->client->setOwner(getThis()); ^ protocolgame.cpp:276:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ protocolgame.cpp: In member function ‘void ProtocolGame::spectatorTurn(uint8_t)’: protocolgame.cpp:325:30: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (index == 0 && direction == -1) { ^ protocolgame.cpp:349:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ [progress=green]50[/progress]
Postado Abril 19, 2022 3 anos Autor Em 19/04/2022 em 00:19, Farathor disse: protocolgame.cpp: In member function ‘void ProtocolGame::spectate(const string&, const string&)’: protocolgame.cpp:141:27: error: ‘stoi’ is not a member of ‘std’ uint32_t total = ctime - std::stoi(value); ^ protocolgame.cpp:172:35: error: request for member ‘addProtocolToAutosend’ in ‘OutputMessagePool::getInstance()’, which is of pointer type ‘OutputMessagePool*’ (maybe you meant to use ‘->’ ?) OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp:172:74: error: ‘shared_from_this’ was not declared in this scope OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp: In member function ‘bool ProtocolGame::spectatePlayer(const string&, const string&)’: protocolgame.cpp:206:24: error: ‘class Spectators’ has no member named ‘resetOwner’ player_old->client->resetOwner(); ^ protocolgame.cpp:216:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ protocolgame.cpp:229:27: error: ‘stoi’ is not a member of ‘std’ uint32_t total = ctime - std::stoi(value); ^ protocolgame.cpp:258:35: error: request for member ‘addProtocolToAutosend’ in ‘OutputMessagePool::getInstance()’, which is of pointer type ‘OutputMessagePool*’ (maybe you meant to use ‘->’ ?) OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp:258:74: error: ‘shared_from_this’ was not declared in this scope OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this()); ^ protocolgame.cpp: In member function ‘void ProtocolGame::returnPlayer()’: protocolgame.cpp:273:35: error: ‘getThis’ was not declared in this scope player->client->setOwner(getThis()); ^ protocolgame.cpp:276:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ protocolgame.cpp: In member function ‘void ProtocolGame::spectatorTurn(uint8_t)’: protocolgame.cpp:325:30: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (index == 0 && direction == -1) { ^ protocolgame.cpp:349:2: error: ‘knownCreatureSet’ was not declared in this scope knownCreatureSet.clear(); ^ usa a distro que eu publiquei aqui, ela já tá com essa feature, e também há novidades nela, qualquer coisa só adapta as coisas que você tem aí ! aka aka
Postado Abril 19, 2022 3 anos A minha é mais otimizada, rs. e tem muita coisa nela, vou tentar adaptar o cast com seta seu nela... [progress=green]50[/progress]
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.