Tetraplovisk
New Member
- Joined
- Jun 22, 2017
- Messages
- 4
- Reaction score
- 0
Hello , i am having a problem i hope you guys can help me figure it out.
So in the client i have this code
and on the server side i have this
i am trying to understand how do i get all the variables that were sent to the server, how do i parse everything?
all i got from that is "identifier "variableName" is undefined"
i need to get from the client to the server side: target, reason, action and so on but i have no clue on how to do it.
thanks
So in the client i have this code
C++:
void ProtocolGame::sendRuleViolation(const std::string& target, int reason, int action, const std::string& comment, const std::string& statement, int statementId, bool ipBanishment)
{
OutputMessagePtr msg(new OutputMessage);
msg->addU8(Proto::ClientRuleViolation);
msg->addString(target);
msg->addU8(reason);
msg->addU8(action);
msg->addString(comment);
msg->addString(statement);
msg->addU16(statementId);
msg->addU8(ipBanishment);
send(msg);
}
and on the server side i have this
C++:
void ProtocolGame::parseRuleViolation(NetworkMessage& msg)
{
std::string target = msg.getString();
uint8_t reason = msg.getByte();
uint8_t action = msg.getByte();
std::string comment = msg.getString();
std::string statement = msg.getString();
uint16_t statementID = msg.get<uint16_t>();
uint8_t ipBan = msg.getByte();
}
i am trying to understand how do i get all the variables that were sent to the server, how do i parse everything?
all i got from that is "identifier "variableName" is undefined"
i need to get from the client to the server side: target, reason, action and so on but i have no clue on how to do it.
thanks
Last edited: