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

System Multi World tfs 1.3

edwinaaa

Member
Joined
Jan 31, 2014
Messages
71
Reaction score
11
hello guys, could you help me how to integrate the possibility of multi world in tfs 1.3?

Use source 12x tfs 1.3
 
Last edited:
Posible Solution?

[error] Query: TRUNCATE TABLE players_online WHERE world_id = "0"

[error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE world_id = "0"' at line 1


[error] Query: INSERT INTO players_online VALUES (22) WHERE world_id = 0
[error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE world_id = 0' at line 1
 
Not sure if this is it, but did you insert the table into the database?
SQL:
CREATE TABLE IF NOT EXISTS `players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `world_id` int(11) NOT NULL DEFAULT '0',
 
Not sure if this is it, but did you insert the table into the database?
SQL:
CREATE TABLE IF NOT EXISTS `players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `world_id` int(11) NOT NULL DEFAULT '0',

if I already have the table like this but the error still appears when the character is connected

[2022-10-07 22:51:54.410] [error] Query: INSERT INTO players_online VALUES (23) WHERE world_id = '0'
[2022-10-07 22:51:54.410] [error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE world_id = '0'' at line 1
Post automatically merged:

1657511577319.png
Post automatically merged:

Apart from the error, I would like to resolve a doubt, when you want to open 2 servers in the same hosting, should you open both simultaneously, changing only the mysql table and the world? or do you have to put a different user within the same IP? Could someone explain to me if something needs to be done with the login.php web files to differentiate and point to one server or another?
 
Last edited:
cool i was looking for this. is not buggy right?
can somebody help me adapt this to tfs 1.5? im having few problems at game.cpp

Lua:
Operación Compilar iniciada..
1>------ Operación Compilar iniciada: Proyecto: theforgottenserver, configuración: Release x64 ------
1>otpch.cpp
1>gameworldconfig.cpp
1>actions.cpp
1>ban.cpp
1>baseevents.cpp
1>C:\Users\felip\source\repos\gameworldconfig.cpp(4,10): fatal  error C1083: No se puede abrir el archivo incluir: 'tools.h': No such file or directory
1>bed.cpp
1>chat.cpp
1>combat.cpp
1>condition.cpp
1>configmanager.cpp
1>connection.cpp
1>container.cpp
1>creature.cpp
1>creatureevent.cpp
1>cylinder.cpp
1>database.cpp
1>databasemanager.cpp
1>databasetasks.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\databasemanager.cpp(25,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>depotchest.cpp
1>depotlocker.cpp
1>events.cpp
1>fileloader.cpp
1>game.cpp
1>globalevent.cpp
1>groups.cpp
1>guild.cpp
1>house.cpp
1>housetile.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\game.cpp(44,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>inbox.cpp
1>ioguild.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\house.cpp(29,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>iologindata.cpp
1>iomap.cpp
1>iomapserialize.cpp
1>iomarket.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(30,35): error C4430: falta el especificador de tipo; se presupone int. Nota: C++ no admite default-int
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(30,24): error C2146: error de sintaxis: falta ';' delante del identificador 'g_gameworld'
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(99,58): error C2665: 'std::vector<Character,std::allocator<Character>>::push_back': ninguna de las 2 sobrecargas pudo convertir todos los tipos de argumento
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector(916,23): message : puede ser 'void std::vector<Character,std::allocator<Character>>::push_back(_Ty &&)'
1>        with
1>        [
1>            _Ty=Character
1>        ] (compilando archivo de origen ..\src\iologindata.cpp)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector(912,23): message : o       'void std::vector<Character,std::allocator<Character>>::push_back(const _Ty &)'
1>        with
1>        [
1>            _Ty=Character
1>        ] (compilando archivo de origen ..\src\iologindata.cpp)
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(99,22): message : 'void std::vector<Character,std::allocator<Character>>::push_back(const _Ty &)': el argumento 1 no puede convertirse de 'std::string' a 'const _Ty &'
1>        with
1>        [
1>            _Ty=Character
1>        ]
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(99,58): message : Razón: no se puede realizar la conversión de 'std::string' a 'const _Ty'
1>        with
1>        [
1>            _Ty=Character
1>        ]
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(99,50): message : No hay disponible ningún operador de conversión definido por el usuario que pueda realizar esta conversión, o bien no se puede llamar al operador
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vector(912,23): message : vea la declaración de 'std::vector<Character,std::allocator<Character>>::push_back' (compilando archivo de origen ..\src\iologindata.cpp)
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(99,58): message : al hacer coincidir la lista de argumentos '(std::string)'
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iologindata.cpp(1006,168): error C2672: 'fmt::v9::format': no se encontró una función sobrecargada que coincida
1>C:\vcpkg\installed\x64-windows\include\fmt\format.h(4183,13): message : puede ser 'std::string fmt::v9::format(const Locale &,fmt::v9::basic_format_string<char,type_identity<T>::type...>,T &&...)' (compilando archivo de origen ..\src\iologindata.cpp)
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(3204,31): message : o       'std::string fmt::v9::format(fmt::v9::basic_format_string<char,type_identity<Args>::type...>,T &&...)' (compilando archivo de origen ..\src\iologindata.cpp)
1>item.cpp
1>items.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iomapserialize.cpp(25,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>luascript.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\iomarket.cpp(29,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>mailbox.cpp
1>map.cpp
1>monster.cpp
1>monsters.cpp
1>mounts.cpp
1>movement.cpp
1>networkmessage.cpp
1>npc.cpp
1>otserv.cpp
1>outfit.cpp
1>outputmessage.cpp
1>party.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\otserv.cpp(38,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>player.cpp
1>position.cpp
1>protocol.cpp
1>protocolgame.cpp
1>protocollogin.cpp
1>protocolold.cpp
1>C:\Users\felip\source\repos\tfs-1.x-8.0-graphics-7-4\src\protocollogin.cpp(32,10): fatal  error C1083: No se puede abrir el archivo incluir: 'gameworldconfig.h': No such file or directory
1>quests.cpp
1>raids.cpp
1>rsa.cpp
1>scheduler.cpp
1>script.cpp
 
Last edited:
I have this error. how did you solve it? @edwinaaa
Lua:
[Error - mysql_real_query] Query: TRUNCATE TABLE `players_online` WHERE `world_id` = 0
Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `world_id` = 0' at line 1
>> Loaded all modules, server starting up...
 
I have this error. how did you solve it? @edwinaaa
Lua:
[Error - mysql_real_query] Query: TRUNCATE TABLE `players_online` WHERE `world_id` = 0
Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `world_id` = 0' at line 1
>> Loaded all modules, server starting up...
 
The issue was solved thanks to @lursky
Lua:
Change the query from “TRUNCATE TABLE” to “DELETE FROM”
now i'm facing loggin problems. I've made a thread TFS 1.X+ - Multiworld log in issue (https://otland.net/threads/multiworld-log-in-issue.285245/) by if any of you guys could lend me a hand
 

Similar threads

Back
Top