Error saving character

failkin

Member
Joined
May 10, 2021
Messages
25
Solutions
1
Reaction score
9
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 1,health = 185,healthmax = 185,experience = 4200,lookbody = 63,lookfeet = 100,lookhead = 52,looklegs = 99,looktype = 129,lookaddons = 0,maglevel = 0,mana = 90,manamax = 90
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 ',lastlogin = 1622648207,lastip = 2429951815,conditions = '',`skulltime...' at line 1
Error while saving player: Failkin

whenever a character logs out I get this error every time they completely reset back to the temple. skull time is in my player database so i'm a little confused where else the error would be? tfs 1.2.
 

M0ustafa

1337
Senator
Joined
Mar 4, 2017
Messages
2,507
Solutions
310
Reaction score
1,082
Location
Egypt
Check this to fix the issue ayusutina mentioned above.
and if it didn't solve your character's saving maybe check this
I also think that you shouldn't compile TFS 1.2 using Visual Studio 2019/vcpkg if you're doing so then you should use Toolsetv141
 
OP
F

failkin

Member
Joined
May 10, 2021
Messages
25
Solutions
1
Reaction score
9
in IOLoginData::savePlayer(), change:
from: query << "sex = " << player->sex << ',';
to: query << "sex = " << (int)(player->sex) << ',';

if you're referring to this I've tried and it didn't work
Post automatically merged:

Check this to fix the issue ayusutina mentioned above.
and if it didn't solve your character's saving maybe check this
I also think that you shouldn't compile TFS 1.2 using Visual Studio 2019/vcpkg if you're doing so then you should use Toolsetv141
Its a Linux VPS ubuntu i didnt use windows for it, the skull time line is in the players table so where would I look to actually quote the 0?
 

ayusutina

Banned User
Joined
May 10, 2013
Messages
127
Solutions
3
Reaction score
99
in IOLoginData::savePlayer(), change:
from: query << "sex = " << player->sex << ',';
to: query << "sex = " << (int)(player->sex) << ',';

if you're referring to this I've tried and it didn't work
Post automatically merged:


Its a Linux VPS ubuntu i didnt use windows for it, the skull time line is in the players table so where would I look to actually quote the 0?

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