- Joined
- Feb 14, 2015
- Messages
- 5,643
- Solutions
- 559
- Reaction score
- 3,949
Everywhere I look on this forum, the thread always directs you to https://otland.net/threads/jak-wysylac-hp-i-mane-w-procentach.181560/
I'm using 0.3.6 V8 and my protocolgame.cpp has
instead of
I've tried putting in
and replacing put<uint16_t> with AddU16 but my server still won't start, can anyone help?
EDIT: Replacing <uint16_t> with AddU16 works perfectly, windows just wouldn't notify me to allow TFS on public servers/private servers until 2 days later for some reason. That's why
I couldn't connect.
I'm using 0.3.6 V8 and my protocolgame.cpp has
Code:
msg->AddU16(player->getHealth());
msg->AddU16(player->getPlayerInfo(PLAYERINFO_MAXHEALTH));
Code:
msg->put<uint16_t>(player->getHealth());
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH));
Code:
if (player->getPlayerInfo(PLAYERINFO_MAXHEALTH) > 0)
{
msg->put<uint16_t>(uint16_t(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH)));
msg->put<uint16_t>(100);
}
else
{
msg->put<uint16_t>(0);
msg->put<uint16_t>(0);
}
EDIT: Replacing <uint16_t> with AddU16 works perfectly, windows just wouldn't notify me to allow TFS on public servers/private servers until 2 days later for some reason. That's why
I couldn't connect.
Last edited: