• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Error Player::onChangeZone compiling linux

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
921
Location
Chile
Hello guys, i need assistance plz, i removed this function Player::eek:nChangeZone to allow players to use mounts in pz, they can actually walk inside pz with mounts but only if they use mount before entering the pz, if they are inside they can't, so i searched and found a thread telling people need to remove this function to make this work,
otland/forgottenserver

so i did, but now when im compiling i get this error and i dont know how to fix it :(
Code:
CMakeFiles/tfs.dir/src/player.cpp.o:(.rodata._ZTV6Player[_ZTV6Player]+0x300): undefined reference to `Player::onChangeZone(ZoneType_t)'
collect2: error: ld returned 1 exit status
make[2]: *** [tfs] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2
root@vps151975:/home/sources/build# CMakeFiles/tfs.dir/src/player.cpp.o:(.rodata._ZTV6Player[_ZTV6Player]+0x300): undefined reference to `Player::onChangeZone(ZoneType_t)'
-bash: syntax error near unexpected token `.rodata._ZTV6Player[_ZTV6Player]+0x300'
root@vps151975:/home/sources/build# collect2: error: ld returned 1 exit status
collect2:: command not found
root@vps151975:/home/sources/build# make[2]: *** [tfs] Error 1
make[2]:: command not found
root@vps151975:/home/sources/build# make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make[1]:: command not found
root@vps151975:/home/sources/build# make: *** [all] Error 2
No command 'make:' found, did you mean:
Command 'make' from package 'make' (main)
Command 'makeg' from package 'xutils-dev' (main)
make:: command not found

plz does anyone know how to fix this? D:
 
thanks man!!! it worked perfectly :D!!!
damn, my bad, it didnt work actually, now i have this

Code:
void Player::onChangeZone(ZoneType_t zone)
{
    if (zone == ZONE_PROTECTION) {
        if (attackedCreature && !hasFlag(PlayerFlag_IgnoreProtectionZone)) {
            setAttackedCreature(nullptr);
            onAttackedCreatureDisappear(false);
        }

    }

    g_game.updateCreatureWalkthrough(this);
    sendIcons();
}
like you told me, but i still can't mount in PZ, it says this action is not permited in a protection zone :C
 
Back
Top