• 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 TFS 8.60 cast system

seleo

Active Member
Joined
Jun 6, 2012
Messages
498
Reaction score
33
Location
Egypt
Hello
I have a problem while compiling TFS 0.4 3777 tibia 860 in Ubuntu 12.4
i tried to remove the -werror flag and that no helping so please if you got any idea about fixing this problem tell me.
Code:
root@149-210-164-222:/var/TFS/source# ./build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 2 cores, using 3 processes
make  all-am
make[1]: Entering directory `/var/TFS/source'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT actions.o -MD -MP -MF .deps/actions.Tpo -c -o actions.o actions.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT beds.o -MD -MP -MF .deps/beds.Tpo -c -o beds.o beds.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT chat.o -MD -MP -MF .deps/chat.Tpo -c -o chat.o chat.cpp
In file included from party.h:20:0,
                 from chat.h:24,
                 from chat.cpp:18:
player.h: In member function قuint32_t Player::getCastIpByName(std::string)ق:
player.h:214:11: error: converting to non-pointer type قuint32_t {aka unsigned int}ق from NULL [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [chat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from actions.cpp:23:0:
player.h: In member function قuint32_t Player::getCastIpByName(std::string)ق:
player.h:214:11: error: converting to non-pointer type قuint32_t {aka unsigned int}ق from NULL [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [actions.o] Error 1
In file included from house.h:27:0,
                 from beds.cpp:20:
player.h: In member function قuint32_t Player::getCastIpByName(std::string)ق:
player.h:214:11: error: converting to non-pointer type قuint32_t {aka unsigned int}ق from NULL [-Werror=conversion-null]
cc1plus: all warnings being treated as errors
make[1]: *** [beds.o] Error 1
make[1]: Leaving directory `/var/TFS/source'
make: *** [all] Error 2
root@149-210-164-222:/var/TFS/source#

and this is my player.h file
http://pastebin.com/0DxXRVy5
 
Go to line 214 and change:
Code:
  return NULL;

to this:
Code:
  return 0;
Thanks for your help
but i have a new error now :(
Code:
root@149-210-164-222:/var/TFS/source# ./build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 2 cores, using 3 processes
make  all-am
make[1]: Entering directory `/var/TFS/source'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT game.o -MD -MP -MF .deps/game.Tpo -c -o game.o game.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT ioban.o -MD -MP -MF .deps/ioban.Tpo -c -o ioban.o ioban.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT ioguild.o -MD -MP -MF .deps/ioguild.Tpo -c -o ioguild.o ioguild.cpp
mv -f .deps/ioban.Tpo .deps/ioban.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT iologindata.o -MD -MP -MF .deps/iologindata.Tpo -c -o iologindata.o iologindata.cpp
mv -f .deps/ioguild.Tpo .deps/ioguild.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT iomap.o -MD -MP -MF .deps/iomap.Tpo -c -o iomap.o iomap.cpp
game.cpp: In constructor قGame::Game()ق:
game.cpp:80:22: error: array subscript is above array bounds [-Werror=array-bounds]
game.h: In member function قvoid Game::globalSave()ق:
game.h:613:76: error: array subscript is above array bounds [-Werror=array-bounds]
game.cpp: In member function قvoid Game::prepareGlobalSave()ق:
game.cpp:6184:30: error: array subscript is above array bounds [-Werror=array-bounds]
game.cpp:6186:22: error: array subscript is above array bounds [-Werror=array-bounds]
cc1plus: all warnings being treated as errors
make[1]: *** [game.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/iomap.Tpo .deps/iomap.Po
mv -f .deps/iologindata.Tpo .deps/iologindata.Po
make[1]: Leaving directory `/var/TFS/source'
make: *** [all] Error 2
root@149-210-164-222:/var/TFS/source#
 
@Elime

Code:
player.h:235:34: error: cannot call constructor ‘PlayerCast::PlayerCast’ directly [-fpermissive]
    cast = PlayerCast::PlayerCast();
                                  ^
player.h:235:34: note: for a function-style cast, remove the redundant ‘::PlayerCast’
In file included from actions.cpp:23:0:
player.h: In member function ‘bool Player::addCastBan(std::string)’:
player.h:252:46: error: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
    cast.bans.push_back(CastBan::CastBan(n, ip));
                                              ^
player.h:252:46: note: for a function-style cast, remove the redundant ‘::CastBan’
player.h: In member function ‘bool Player::addCastMute(std::string)’:
player.h:273:47: error: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
    cast.muted.push_back(CastBan::CastBan(n, ip));
                                               ^
player.h:273:47: note: for a function-style cast, remove the redundant ‘::CastBan’
In file included from house.h:27:0,
                 from beds.cpp:20:
player.h: In member function ‘void Player::kickCastViewers()’:
player.h:235:34: error: cannot call constructor ‘PlayerCast::PlayerCast’ directly [-fpermissive]
    cast = PlayerCast::PlayerCast();
                                  ^
player.h:235:34: note: for a function-style cast, remove the redundant ‘::PlayerCast’
In file included from house.h:27:0,
                 from beds.cpp:20:
player.h: In member function ‘bool Player::addCastBan(std::string)’:
player.h:252:46: error: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
    cast.bans.push_back(CastBan::CastBan(n, ip));
                                              ^
player.h:252:46: note: for a function-style cast, remove the redundant ‘::CastBan’
player.h: In member function ‘bool Player::addCastMute(std::string)’:
player.h:273:47: error: cannot call constructor ‘CastBan::CastBan’ directly [-fpermissive]
    cast.muted.push_back(CastBan::CastBan(n, ip));
                                               ^
player.h:273:47: note: for a function-style cast, remove the redundant ‘::CastBan’
 
Back
Top