# AACError while saving player

#### Unknown Soldier

##### Mapping a map
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?

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:

#### roriscrave

Code:
`` src/iologindata.cpp``

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

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

Replies
1
Views
67
Replies
1
Views
186
Replies
1
Views
81
Replies
3
Views
128
Replies
6
Views
196
Replies
2
Views
206
Replies
2
Views
289
Replies
1
Views
156
Replies
8
Views
263