TFS 0.X linux compiling error

elkingahmed

Intermediate OT User
Joined
May 31, 2012
Messages
113
Reaction score
1
im trying to compile my 0.4 sources using linux but getting these errors

In file included from player.cpp:20:0:
player.h:1217:30: error: ‘virtual void Player::drainHealth(Creature*, CombatType_t, int64_t)’ cannot be overloaded
virtual void drainHealth(Creature* attacker, CombatType_t combatType, int64_t damage);
^
player.h:504:16: error: with ‘virtual void Player::drainHealth(Creature*, CombatType_t, int64_t)’
virtual void drainHealth(Creature* attacker, CombatType_t combatType, int64_t damage);
^
player.h:1218:16: error: ‘virtual void Player::drainMana(Creature*, CombatType_t, int64_t)’ cannot be overloaded
virtual void drainMana(Creature* attacker, CombatType_t combatType, int64_t damage);
^
player.h:505:16: error: with ‘virtual void Player::drainMana(Creature*, CombatType_t, int64_t)’
virtual void drainMana(Creature* attacker, CombatType_t combatType, int64_t damage);
^
player.h:1220:30: error: ‘virtual void Player::changeHealth(int64_t)’ cannot be overloaded
virtual void changeHealth(int64_t healthChange);
^
player.h:478:16: error: with ‘virtual void Player::changeHealth(int64_t)’
virtual void changeHealth(int64_t healthChange);
^
player.h:1221:16: error: ‘virtual void Player::changeMana(int64_t)’ cannot be overloaded
virtual void changeMana(int64_t manaChange);
^
player.h:479:16: error: with ‘virtual void Player::changeMana(int64_t)’
virtual void changeMana(int64_t manaChange);
^
player.h:1222:33: error: ‘virtual int64_t Player::getMaxHealth() const’ cannot be overloaded
virtual int64_t getMaxHealth() const {return getPlayerInfo(PLAYERINFO_MAXHEALTH);}
^
player.h:378:19: error: with ‘virtual int64_t Player::getMaxHealth() const’
virtual int64_t getMaxHealth() const {return getPlayerInfo(PLAYERINFO_MAXHEALTH);}
^
player.h:1223:19: error: ‘virtual int64_t Player::getMaxMana() const’ cannot be overloaded
virtual int64_t getMaxMana() const {return getPlayerInfo(PLAYERINFO_MAXMANA);}
^
player.h:379:19: error: with ‘virtual int64_t Player::getMaxMana() const’
virtual int64_t getMaxMana() const {return getPlayerInfo(PLAYERINFO_MAXMANA);}
^
player.cpp: In member function ‘void Player::addManaSpent(uint64_t, bool)’:
player.cpp:1950:21: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
if(magLevel < 156 && player->getVocationId() == 1 || player->getVocationId() == 2 || player->getVocationId() == 5 || player->getVocationId() == 6){
^
player.cpp:1955:27: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
} else if(magLevel < 25 && player->getVocationId() == 3 || player->getVocationId() == 4 || player->getVocationId() == 7 || player->getVocationId() == 8){
^
player.cpp: In member function ‘virtual void Player::doAttacking(uint32_t)’:
player.cpp:3489:85: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else if((OTSYS_TIME() - lastAttack) < getAttackSpeed() || lastAttack >= OTSYS_TIME())
^
player.cpp: In member function ‘virtual double Player::getGainedExperience(Creature*) const’:
player.cpp:3548:11: warning: unused variable ‘a’ [-Wunused-variable]
uint32_t a = (uint32_t)std::floor(attackerLevel * 0.9), b = level;
^
player.cpp:3548:58: warning: unused variable ‘b’ [-Wunused-variable]
uint32_t a = (uint32_t)std::floor(attackerLevel * 0.9), b = level;
^
player.cpp:3549:11: warning: unused variable ‘c’ [-Wunused-variable]
uint64_t c = getExperience();
^
player.cpp: In member function ‘virtual GuildEmblems_t Player::getGuildEmblem(const Creature*) const’:
player.cpp:3910:16: warning: unused variable ‘player2’ [-Wunused-variable]
const Player* player2 = this->getPlayer();
^
player.cpp: At global scope:
player.cpp:4097:6: error: redefinition of ‘void Player::changeHealth(int64_t)’
void Player::changeHealth(int64_t healthChange)
^
player.cpp:674:6: error: ‘virtual void Player::changeHealth(int64_t)’ previously defined here
void Player::changeHealth(int64_t healthChange)
^
player.cpp:4103:6: error: redefinition of ‘void Player::changeMana(int64_t)’
void Player::changeMana(int64_t manaChange)
^
player.cpp:680:6: error: ‘virtual void Player::changeMana(int64_t)’ previously defined here
void Player::changeMana(int64_t manaChange)
^
make[1]: *** [player.o] Error 1
make[1]: Leaving directory `/var/sources'
make: *** [all] Error 2

player.cpp : player.cpp - Pastebin.com
player.h : player.h - Pastebin.com
 
Top