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

AAC Error while saving player

Unknown Soldier

Mapping a map
Joined
Oct 30, 2010
Messages
263
Solutions
11
Reaction score
621
Hey,

so I tried not to spam here, but I am stuck.

TFS 1.3 / 10.98
MyAcc 0.8.0
Uniserv

After installing TFS 1.3 and MyACC and clearing few errors I started checking if everything is running fine, and I noticed that I cannot save a character, example: I take any item to inventory, move a little, relog, then the character logs in at old coordinates without any changes in inventory. The error in console looks like this :

Code:
[Error - mysql_real_query] Query: INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES (1,3,101,1987,1,''),(1,4,102,2651,1,''),(1,6,103,2382,1,''),(1,10,104,2050,1,''),(1,101,105,33206,1,''),(1,101,106,2674,1,'')
Message: Out of range value for column 'itemtype' at row 5
[Error - mysql_real_query] Query: INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES (1,3,101,1987,1,''),(1,4,102,2651,1,''),(1,6,103,2382,1,''),(1,10,104,2050,1,''),(1,101,105,33206,1,''),(1,101,106,2674,1,'')
Message: Out of range value for column 'itemtype' at row 5
[Error - mysql_real_query] Query: INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES (1,3,101,1987,1,''),(1,4,102,2651,1,''),(1,6,103,2382,1,''),(1,10,104,2050,1,''),(1,101,105,33206,1,''),(1,101,106,2674,1,'')
Message: Out of range value for column 'itemtype' at row 5
Error while saving player:

Does anyone know the solution?

Thanks in advance!
Post automatically merged:

Solution for future questions... It basically didn't want to save items with ID above 32676, try changing 'itemtype' data type from smallint or int to mediumint. Also this should be done in itemtype in player_inboxitems and player_depotitems. This applies to all items with ID above mentioned number.
 
Last edited:
go in your source folder:
Code:
 src/iologindata.cpp

change it:
Lua:
query << "`sex` = " << player->sex << ',';

to it:
Lua:
query << "`sex` = " << static_cast<uint16_t>(player->sex) << ',';

recompile your source
 
Back
Top