Jump to content

[Help] Using GetPlayer() in player.cpp ...


Recommended Posts

Posted

Hello, i want use GetPlayer() in player.cpp in the function void Player::DuelComplete(DuelCompleteType type); (line 6653) but i have a error at the compilation:

../../../src/game/Player.cpp: In member function 'void Player::DuelComplete(DuelCompleteType)':
../../../src/game/Player.cpp:6657: error: 'GetPlayer' was not declared in this scope

But i have check the include and everything seems good ...

Please help for fix my error :)

Posted

Read Vladimir' message and make a conclusion.

For example:

Player* currPlr = this;

Player* oppont = duel->opponent; // i think here can be maked some optimization... duel->opponent can be replaced with victim or smth else.

And than u can use it in your method:

char* currPlrName = currPlr->GetName(); //but would be nice if you'll uses this->GetName();

//And for a opponent the same operation;

char* oppontName = oppont->GetName();

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use