• 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!

Compilling error

Antrhaxcs

New Member
Joined
Aug 8, 2007
Messages
247
Reaction score
0
Location
Venezuela
Hello friends
I've tried to make somes changes to lookfeet damage thing
and here is the problem:

I'm trying to change this line:

if(attacker && target && attacker->defaultOutfit.lookFeet == target->defaultOutfit.lookFeet && g_config.getString(ConfigManager::CANNOT_ATTACK_SAME_LOOKFEET) == "yes" && combatType != COMBAT_HEALING)


for this one


if(attacker && target && attacker->player->getSex() == target->player->getSex() && g_config.getString(ConfigManager::CANNOT_ATTACK_SAME_LOOKFEET) == "yes" && combatType != COMBAT_HEALING)


Explain...

I want to players can't attack others players of the same sex...

but when compile I got this error...
(Taken from compile log)
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Yuri\Escritorio\Forgotten Sources\project\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Yuri\Escritorio\Forgotten Sources\project\Makefile.win" all
g++.exe -c ../actions.cpp -o ../actions.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/boost_1_33_1" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__

g++.exe -c ../game.cpp -o ../game.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/boost_1_33_1" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__

../game.cpp: In member function `bool Game::combatChangeHealth(CombatType_t, Creature*, Creature*, int32_t)':
../game.cpp:2818: error: 'class Creature' has no member named 'player'
../game.cpp:2818: error: 'class Creature' has no member named 'player'

make.exe: *** [../game.o] Error 1

Execution terminated


Can someone explain to a poor noob on compilling how to declare members :eek:?

Thanks in advance.
Your Antrhaxcs.

-Edit- I Tried with target->getSex() too and got error too.
 
Last edited:
Change:
attacker->player->getSex() == target->player->getSex()
to:
attacker->getPlayer() && target->getPlayer() && attacker->getPlayer()->getSex() == target->getPlayer()->getSex()
 
Back
Top