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

Database issue

azzmckay6

Member
Joined
Aug 30, 2020
Messages
59
Reaction score
10
Hey guys, looking for a bit of help with solving my current issue.. my database is unable to save players, i get this error code:


[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
Error while saving player: Bowna


any help would be hugely appreciated,
thanks.
 
Is that with every character is this specific one?
otherwise try delete this one and create a new one and try save that ?
 
Would be nice to know what 'blessings' value generates server, but it's not visible in part of query that is in error.
If you can't add some code to print it in C++ before save, you can change 'blessings' column type to 'int(11)' and remove 'unsigned' attribute if its there. Then we will see what server tries to put in this column.
 
after making the changes that you advised, this is the error i got


Bowna has logged out.
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
[Error - mysql_real_query] Query: UPDATE players SET level = 8,group_id = 1,vocation = 3,health = 185,healthmax = 185,experience = 4200,lookbody = 0,lookfeet = 0,lookhead = 0,looklegs = 0,looktype = 128,lookaddons = 0,maglevel = 0,mana = 35,manamax = 35,`man
Message: Out of range value for column 'blessings' at row 1
 
What engine is it? In case of TFS, to view value you must add there ( somewhere under: query << "blessings = ):
That line:
Code:
std::cout << "blessings: " << (int) player->blessings << std::endl;
That way we may find value and try to fix it.

You can also fuckup your blessing system, but make 'save' work. Send this SQL to database (by phpmyadmin etc.):
Code:
set global sql_mode='';
It should hide 'out of range' error, but it's not real fix.

What if he tries to print player blessings onLogout ?
In case of TFS 1.2+ it's not possible to view that value from LUA, as there are only functions: addBlessing, hasBlessing and removeBlessing, but no function to read real integer value that is stored in C++.
 
Back
Top