• 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+ Player position not saving

Gofrion

Rookgaard RPG
Premium User
Joined
May 1, 2017
Messages
223
Solutions
1
Reaction score
99
Location
/home/tfs/
Hello everyone i have a small problem.

The players' positions are not saved, and after logging in again, the character returns to the temple each time.

Could someone tell me where to look for the problem? Thanks in advance.
 
Solution
LUA:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 2,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 68,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magleve
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 '\0001,`lastlogin` = 1754895912,`lastip` = 352764244,`conditions` = '',`skulltime`...' at line 1
Error while saving player: test

yeah when i make relog i have the same error in console all time.
Verify inside your iologindata.cpp the function

C++:
bool IOLoginData::savePlayer(Player*...
i found out something quite interesting yesterday in tibia rl you change player path even if you are neraby to a wall example you are next to a wall looking to north west if you press right arrow the char will change it's sight to the west, such thing does not occurs in otses
 
Hello everyone i have a small problem.

The players' positions are not saved, and after logging in again, the character returns to the temple each time.

Could someone tell me where to look for the problem? Thanks in advance.

Any errors in console?

Did u check if you got by default any script on that tps player to temple?
Open your server folder in microsoft code then use search function

1754856476219.webp
 
I use this repo:

when i looking for
PHP:
player:teleportTo
i didnt see anything.

its a small video from my server:

its a error from console:
Code:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 2,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 68,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magleve
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 '\0001,`lastlogin` = 1754895603,`lastip` = 352764244,`conditions` = '',`skulltime`...' at line 1

Now i see also when i create items by GOD and put to my backpack when i relog the items gone.

For any help big thank you! :)
 
Last edited:
I use this repo:

when i looking for
PHP:
player:teleportTo
i didnt see anything.

its a small video from my server:

its a error from console:
Code:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 2,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 68,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magleve
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 '\0001,`lastlogin` = 1754895603,`lastip` = 352764244,`conditions` = '',`skulltime`...' at line 1

Now i see also when i create items by GOD and put to my backpack when i relog the items gone.

For any help big thank you! :)
Thats the complete error text from you console?

Looks like imcompleted, check on iologindata.cpp, you added something there before?
 
LUA:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 2,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 68,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magleve
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 '\0001,`lastlogin` = 1754895912,`lastip` = 352764244,`conditions` = '',`skulltime`...' at line 1
Error while saving player: test

yeah when i make relog i have the same error in console all time.
 
LUA:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 2,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 68,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magleve
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 '\0001,`lastlogin` = 1754895912,`lastip` = 352764244,`conditions` = '',`skulltime`...' at line 1
Error while saving player: test

yeah when i make relog i have the same error in console all time.
Verify inside your iologindata.cpp the function

C++:
bool IOLoginData::savePlayer(Player* player)
 
Solution
I do the same from this tutorial and recompile: Characters being reset after logging out. (https://otland.net/threads/characters-being-reset-after-logging-out.265040/)

but problem is the same, error still the same in console.

before i didnt see but when i start my TFS i see at top this error also:
LUA:
>> Establishing database connection...WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
Post automatically merged:

Fixed!

LUA:
You need to modify iologindata.cpp and recompile.

Change line 688 from

query << "sex = " << player->sex << ',';

to

query << "sex = " << (int)(player->sex) << ',';

or if that doesn't work, try:

query << "sex = " << static_cast<uint16_t>(player->sex) << ',';

the last option works for me.

Thanks for your help!
 
Last edited:
Back
Top