Need to fix
SQL
CREATE TABLE IF NOT EXISTS `vending_items` (
`vending_id` int(10) unsigned NOT NULL,
`index` smallint(5) unsigned NOT NULL,
`cartinventory_id` int(10) unsigned NOT NULL,
`amount` smallint(5) unsigned NOT NULL,
`price` int(10) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
need add `type` int(10) unsigned NOT NULL for item you vend.Vending.c
if( Sql_Query( mmysql_handle, "INSERT INTO `%s`(`vending_id`,`index`,`cartinventory_id`,`amount`,`price`) VALUES( %d, %d, %d, %d, %d );", vending_items_db, sd->vender_id, i, sd->status.cart[sd->vending[i].index].id, sd->vending[i].amount, sd->vending[i].value ) != SQL_SUCCESS ){
need to get item type that you vend to insert to the database.
void vending_reopen( struct map_session_data* sd ){
need add variable item type that you vend.if you want to fix this faster, help each other.