Jpstafe
Member
- Joined
- Aug 8, 2011
- Messages
- 227
- Reaction score
- 24
Lua:
1>protocolgame.cpp
1>C:\Users\jpstafe\Documents\GitHub\Nekiro-2.0\src\protocolgame.cpp(1291,120): error C2664: 'void Dispatcher::addTask(Task *)': cannot convert argument 1 from 'ProtocolGame::parseSeekInContainer::<lambda_71ac29dbf4b2991fc4f7e0663329a467>' to 'Task *'
1>C:\Users\jpstafe\Documents\GitHub\Nekiro-2.0\src\protocolgame.cpp(1291,119): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>C:\Users\jpstafe\Documents\GitHub\Nekiro-2.0\src\tasks.h(69,8): message : see declaration of 'Dispatcher::addTask'
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
Code:
Severity Code Description Project File Line Suppression State
Error C2664 'void Dispatcher::addTask(Task *)': cannot convert argument 1 from 'ProtocolGame::parseSeekInContainer::<lambda_71ac29dbf4b2991fc4f7e0663329a467>' to 'Task *' theforgottenserver C:\Users\jpstafe\Documents\GitHub\Nekiro-2.0\src\protocolgame.cpp 1291
Code:
void ProtocolGame::parseSeekInContainer(NetworkMessage& msg)
{
uint8_t containerId = msg.getByte();
uint16_t index = msg.get<uint16_t>();
g_dispatcher.addTask([=, playerID = player->getID()]() { g_game.playerSeekInContainer(playerID, containerId, index); });
}
help pls