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

TFS 1.X+ OTS Statistics Implementation Downgraded TFS 1.5

iNux

Intermediate OT User
Joined
Jan 19, 2019
Messages
214
Reaction score
111
Hello!

I'm currently trying to implement the OTS statistics system by Kondra by following @Gesior.pl guide Here: OTS Statistics by kondra (otclient@************) · gesior/forgottenserver-gesior@0ad4be6 (https://github.com/gesior/forgottenserver-gesior/commit/0ad4be6cab3e335e6f7dc767722f70ee0c849be8) into TFS 1.5 Downgrade by Nekiora, GitHub - nekiro/TFS-1.5-Downgrades at 8.0 (https://github.com/nekiro/TFS-1.5-Downgrades/tree/8.0).

I'm having an issue when compiling as I get the following information on the console:

LUA:
7.450 [  7%] Building CXX object CMakeFiles/tfs.dir/src/bed.cpp.o
8.477 /usr/src/forgottenserver/src/bed.cpp: In member function 'bool BedItem::sleep(Player*)':
8.477 /usr/src/forgottenserver/src/bed.cpp:167:30: error: 'createSchedulerTask' was not declared in this scope; did you mean 'SchedulerTask'?
8.477   167 |         g_scheduler.addEvent(createSchedulerTask(SCHEDULER_MINTICKS, std::bind(&Game::kickPlayer, &g_game, playerId, false)));
8.477       |                              ^~~~~~~~~~~~~~~~~~~
8.477       |                              SchedulerTask
8.952 make[2]: *** [CMakeFiles/tfs.dir/build.make:157: CMakeFiles/tfs.dir/src/bed.cpp.o] Error 1
8.952 make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/tfs.dir/all] Error 2
8.953 make: *** [Makefile:91: all] Error 2
------
Dockerfile:26

It seems that it complains about this function.

I assume since I changed the createSchedulerTask to createSchedulerTaskWithStats in the src/scheduler.cpp I must change the function name in the bed.cpp?

I tried that and this was the result:
LUA:
7.064 [  7%] Building CXX object CMakeFiles/tfs.dir/src/bed.cpp.o
8.031 /usr/src/forgottenserver/src/bed.cpp: In member function 'bool BedItem::sleep(Player*)':
8.031 /usr/src/forgottenserver/src/bed.cpp:167:58: error: too few arguments to function 'SchedulerTask* createSchedulerTaskWithStats(uint32_t, TaskFunc&&, const std::string&, const std::string&)'
8.031   167 |         g_scheduler.addEvent(createSchedulerTaskWithStats(SCHEDULER_MINTICKS, std::bind(&Game::kickPlayer, &g_game, playerId, false)));
8.031       |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8.031 In file included from /usr/src/forgottenserver/src/bed.cpp:25:
8.031 /usr/src/forgottenserver/src/scheduler.h:53:16: note: declared here
8.031    53 | SchedulerTask* createSchedulerTaskWithStats(uint32_t delay, TaskFunc&& f, const std::string& description, const std::string& extraDescription);
8.031       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
8.442 make[2]: *** [CMakeFiles/tfs.dir/build.make:157: CMakeFiles/tfs.dir/src/bed.cpp.o] Error 1
8.442 make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/tfs.dir/all] Error 2
8.442 make: *** [Makefile:91: all] Error 2
------
Dockerfile:26

Is the issue that the createSchedulerTaskWithStats requires more paraments then what I have provided in the createSchedulerTaskWithStats function in bed.cpp?
 
Thank you very much, i'll have a look and try it out.
I was facing the same misunderstanding
 
Back
Top