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

C++ AutoLootSystem Error Compiling

adrenyslopez

Member
Joined
Dec 22, 2015
Messages
201
Reaction score
15
Hi, help me with this error when compiling please

i am following this tutorial
me use OTBR tfs 1.3
Auto Loot System Tfs1.3

Lua:
/home/forgottenserver/src/actions.cpp: In member function ‘ReturnValue Actions::internalUseItem(Player*, const Position&, uint8_t, Item*, bool)’:
/home/forgottenserver/src/actions.cpp:433:45: error: ‘MESSAGE_INFO_DESCR’ was not declared in this scope
                     player->sendTextMessage(MESSAGE_INFO_DESCR, msgAutoLoot.str());
                                             ^~~~~~~~~~~~~~~~~~
/home/forgottenserver/src/actions.cpp:437:37: error: ‘MESSAGE_INFO_DESCR’ was not declared in this scope
             player->sendTextMessage(MESSAGE_INFO_DESCR, "Sorry, you don't have enough capacity to use auto loot, so it has been disabled. (100+ capacity is required)");
                                     ^~~~~~~~~~~~~~~~~~
/home/forgottenserver/src/actions.cpp:471:22: error: qualified-id in declaration before ‘(’ token
bool Actions::useItem(Player* player, const Position& pos, uint8_t index, Item* item, bool isHotkey)
                      ^
/home/forgottenserver/src/actions.cpp:638:1: error: expected ‘}’ at end of input
}
^
[ 10%] Building CXX object CMakeFiles/otbr_lib.dir/src/combat.cpp.o
CMakeFiles/otbr_lib.dir/build.make:110: recipe for target 'CMakeFiles/otbr_lib.dir/src/actions.cpp.o' failed
make[2]: *** [CMakeFiles/otbr_lib.dir/src/actions.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/otbr_lib.dir/all' failed
make[1]: *** [CMakeFiles/otbr_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
ERROR.png

my actions.cpp
 
Last edited:
change msg_info_descr to MESSAGE_LOOK or something, they seem to not care at all about backward compatibility:

now i have this error

Lua:
/home/forgottenserver/src/actions.cpp: In member function ‘ReturnValue Actions::internalUseItem(Player*, const Position&, uint8_t, Item*, bool)’:
/home/forgottenserver/src/actions.cpp:471:22: error: qualified-id in declaration before ‘(’ token
 bool Actions::useItem(Player* player, const Position& pos, uint8_t index, Item* item, bool isHotkey)
                      ^
/home/forgottenserver/src/actions.cpp:638:1: error: expected ‘}’ at end of input
 }
 ^
[ 10%] Building CXX object CMakeFiles/otbr_lib.dir/src/combat.cpp.o
CMakeFiles/otbr_lib.dir/build.make:110: recipe for target 'CMakeFiles/otbr_lib.dir/src/actions.cpp.o' failed
make[2]: *** [CMakeFiles/otbr_lib.dir/src/actions.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/otbr_lib.dir/all' failed
make[1]: *** [CMakeFiles/otbr_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
 
Back
Top