Black Dove
Web-Developer
To Apply Hp And Mp Percentage I Was Asked To Replace
With This
And When I Open Protocolgame.ccp
I Found It
Not The Code I Should Replace .. And If I Ignore That And Change What In The Picture And " Compiling " It Give Me Errors Like That

Help Me Please .. What Is The Wrong ... :/
Code:
msg->put<uint16_t>(player->getHealth());
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH));
With This
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);
}
And When I Open Protocolgame.ccp
I Found It

Not The Code I Should Replace .. And If I Ignore That And Change What In The Picture And " Compiling " It Give Me Errors Like That

Help Me Please .. What Is The Wrong ... :/

