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

No save Players tfs 1.2

jareczekjsp

Member
Joined
Jan 30, 2023
Messages
267
Solutions
1
Reaction score
22
GitHub
Jarek123
Hello I use tfs 1.2 tibia 7.72 and I have problem when I relog I start from start and is error in console

LUA:
GOD Xenera has logged in.
GOD Xenera has logged out.
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 13,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 23200,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magle
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 '' at line 1
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 13,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 23200,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magle
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 '' at line 1
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 13,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 23200,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`lookaddons` = 0,`lookmount` = 0,`ridingmount` = 0,`magle
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 '' at line 1
Error while saving player: GOD Xenera
GOD Xenera has logged in.

iologindata.cpp

 
Some newer compilers (probably Visual Studio) cannot detect uint8_t and char as separate types. It makes SQL query try to send some bytes (uint8_t) as letters (char) and SQL cannot process it.
You got to force parameter type in SQL query ex.:
All uint8_t variables from a Player object stored in the database must be explicitly converted to uint16_t, so that the compiler treats them as numbers (int) rather than individual letters (char).
 
Back
Top