• 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+ Many errors in lua TFS 1.4.2

OTcreator

Active Member
Joined
Feb 14, 2022
Messages
425
Solutions
1
Reaction score
44
Hello!
I use 1.4.2 and have much errors.
etc: OFFLINE TRAINING.
WTF?

Lua:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/engine/offlinetraining.lua:onLogin
getNumber(). Argument 2 has out-of-range value for j: -1
stack traceback:
        [C]: in function 'setOfflineTrainingSkill'
        data/creaturescripts/scripts/engine/offlinetraining.lua:10: in function <data/creaturescripts/scripts/engine/offlinetraining.lua:1>
 
Just grab the TFS 1.4.2 script and add it to your server.

I have this script, the problem is that i get error like this.
I also added an error about trying to compile the repo @Evil Puncker in the main topic 1.4.

The Forgotten Server 1.4 (https://otland.net/threads/the-forgotten-server-1-4.278046/page-5#post-2732339)

I think I'm using the original version without patches, and I can't compile the repository that is accepted up to 1.4.3 by Evil.
Getting a lot of errors the same for NPCs during trade, and they are default.

If someone could provide me with a compiled TFS 1.4.2 with all patches under Ubuntu, that would be great.
If not, please let me know why I can't compile this source.
I have all libs downloaded...


GitHub - EPuncker/forgottenserver at 1.4.3 (https://github.com/EPuncker/forgottenserver/tree/1.4.3)

Errors:

C++:
[  3%] Building CXX object src/CMakeFiles/tfslib.dir/actions.cpp.o
In file included from /var/www/forgottenserver/src/tile.h:9,
                 from /var/www/forgottenserver/src/container.h:9,
                 from /var/www/forgottenserver/src/actions.cpp:10:
/var/www/forgottenserver/src/tools.h:83:37: error: use of ‘auto’ in parameter declaration only available with ‘-fconcepts’ [-Werror]
   83 | inline constexpr auto to_underlying(auto e) noexcept { return static_cast<std::underlying_type_t<decltype(e)>>(e); }
      |                                     ^~~~
In file included from /var/www/forgottenserver/src/player.h:12,
                 from /var/www/forgottenserver/src/game.h:10,
                 from /var/www/forgottenserver/src/actions.cpp:11:
/var/www/forgottenserver/src/guild.h:57:2: error: extra ‘;’ [-Werror=pedantic]
   57 | }; // namespace IOGuild
      |  ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/tfslib.dir/build.make:76: src/CMakeFiles/tfslib.dir/actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:181: src/CMakeFiles/tfslib.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
 
Hello!
I use 1.4.2 and have much errors.
etc: OFFLINE TRAINING.
WTF?

Lua:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/engine/offlinetraining.lua:onLogin
getNumber(). Argument 2 has out-of-range value for j: -1
stack traceback:
        [C]: in function 'setOfflineTrainingSkill'
        data/creaturescripts/scripts/engine/offlinetraining.lua:10: in function <data/creaturescripts/scripts/engine/offlinetraining.lua:1>

change the part of the script corresponding to:

Lua:
	if offlineTrainingSkill == 99 or offlineTrainingSkill == -1 then
		player:addOfflineTrainingTime(offlineTime * 1000)
		return true
	end

	player:setOfflineTrainingSkill(99)

I don't think this is the correct solution but here it is working (I didn't do big tests)
 
I have same problem on 1.4.2 and really dont understand what happen. and today i start to get also this error and then alwasys crash server:
fts: /root/Downloads/ots/src/luascript.h:209: static ScriptEnviroment* LuaScriptInterface:getScriptEnv(): Assertion 'scriptEnvIndex >=0 && scriptEnvIndex < 16' failed

strange thing it that /root/Downloads/ots folder not exist and has nothing to do with original server location so I am just watching what happens.

another think is that my memory on my ubuntu machine is draining as f... I just relog and there was 6 GB less. something is eating my Hard Drive. Its happen also when I reinstall my Ubuntu.


edit: ok hard dirve draining i figure it out is doing crashlogs, but still its mystery about luascript.h 209. but sorry for posting here. i know its not my thread. anyway I have same errors on 1.4.2 as a guy up.
 
Last edited:
Back
Top