• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Windows A error in mine database?

Animera

* * * * *
Joined
Dec 9, 2008
Messages
2,449
Solutions
5
Reaction score
618
Location
ANIMERARPG.ONLINE
Everytime a char relogs this error appears:
Code:
mysql_real_query(): DELETE FROM `player_depotitems` WHERE `player_id` = 8 - MYSQL ERROR: Table 'otserv.player_depotitems' doesn't exist (1146)
mysql_real_query(): DELETE FROM `player_depotitems` WHERE `player_id` = 8 - MYSQL ERROR: Table 'otserv.player_depotitems' doesn't exist (1146)
mysql_real_query(): DELETE FROM `player_depotitems` WHERE `player_id` = 8 - MYSQL ERROR: Table 'otserv.player_depotitems' doesn't exist (1146)
Error while saving player: Znote.
mysql_real_query(): SELECT `id`, `value`, `param`, `expires` FROM `bans` WHERE `type` = 1 AND `active` = 1 - MYSQL ERROR: Table 'otserv.bans' doesn't exist (1146)
mysql_real_query(): SELECT * FROM `bans` WHERE `value` = 3 AND `type` = 3 AND `active` = 1 AND (`expires` > 1297387731 OR `expires` <= 0) LIMIT 1 - MYSQL ERROR: Table 'otserv.bans' doesn't exist (1146)
mysql_real_query(): SELECT * FROM `bans` WHERE `value` = 268442542 AND `param` = 3 AND `type` = 2 AND `active` = 1 AND (`expires` > 1297387731 OR `expires` <= 0) LIMIT 1 - MYSQL ERROR: Table 'otserv.bans' doesn't exist (1146)
mysql_real_query(): SELECT `id` FROM `bans` WHERE `type` = 2 AND `value` = 8 AND `param` = 2 AND `active` = 1 LIMIT 1 - MYSQL ERROR: Table 'otserv.bans' doesn't exist (1146)
mysql_real_query(): SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_depotitems` WHERE `player_id` = 8 ORDER BY `sid` DESC - MYSQL ERROR: Table 'otserv.player_depotitems' doesn't exist (1146)
 
Execute this on phpMyAdmin
SQL:
CREATE TABLE `player_depotitems`
(
	`player_id` INT NOT NULL,
	`sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
	`pid` INT NOT NULL DEFAULT 0,
	`itemtype` INT NOT NULL,
	`count` INT NOT NULL DEFAULT 0,
	`attributes` BLOB NOT NULL,
	KEY (`player_id`), UNIQUE (`player_id`, `sid`),
	FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `bans`
(
	`id` INT UNSIGNED NOT NULL auto_increment,
	`type` TINYINT(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion',
	`value` INT UNSIGNED NOT NULL COMMENT 'ip address (integer), player guid or account number',
	`param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'used only for ip banishment mask (integer)',
	`active` TINYINT(1) NOT NULL DEFAULT TRUE,
	`expires` INT NOT NULL,
	`added` INT UNSIGNED NOT NULL,
	`admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
	`comment` TEXT NOT NULL,
	`reason` INT UNSIGNED NOT NULL DEFAULT 0,
	`action` INT UNSIGNED NOT NULL DEFAULT 0,
	`statement` VARCHAR(255) NOT NULL DEFAULT '',
	PRIMARY KEY (`id`),
	KEY `type` (`type`, `value`),
	KEY `active` (`active`)
) ENGINE = InnoDB;
 
@up thanks it helped a bit but it got still some bugs on startup

Code:
mysql_real_query(): DELETE FROM `house_lists` WHERE `house_id` = 185 AND `world_id` = 0 - MYSQL ERROR: Table 'otserv.house_lists' doesn't exist (1146)
mysql_real_query(): DELETE FROM `house_lists` WHERE `house_id` = 186 AND `world_id` = 0 - MYSQL ERROR: Table 'otserv.house_lists' doesn't exist (1146)
mysql_real_query(): DELETE FROM `tile_items` WHERE `world_id` = 0 - MYSQL ERROR: Table 'otserv.tile_items' doesn't exist (1146)
mysql_real_query(): DELETE FROM `tile_items` WHERE `world_id` = 0 - MYSQL ERROR: Table 'otserv.tile_items' doesn't exist (1146)
mysql_real_query(): DELETE FROM `tile_items` WHERE `world_id` = 0 - MYSQL ERROR: Table 'otserv.tile_items' doesn't exist (1146)

and there is much more but they all look exactly the same likethat house_list
 
SQL:
CREATE TABLE `house_lists` (
  `house_id` int(10) unsigned NOT NULL,
  `world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
  `listid` int(11) NOT NULL,
  `list` text NOT NULL,
  UNIQUE KEY `house_id` (`house_id`,`world_id`,`listid`),
  CONSTRAINT `house_lists_ibfk_1` FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `tile_items` (
  `tile_id` int(10) unsigned NOT NULL,
  `world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
  `sid` int(11) NOT NULL,
  `pid` int(11) NOT NULL DEFAULT '0',
  `itemtype` int(11) NOT NULL,
  `count` int(11) NOT NULL DEFAULT '0',
  `attributes` blob NOT NULL,
  UNIQUE KEY `tile_id` (`tile_id`,`world_id`,`sid`),
  KEY `sid` (`sid`),
  CONSTRAINT `tile_items_ibfk_1` FOREIGN KEY (`tile_id`) REFERENCES `tiles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
Try these
SQL:
CREATE TABLE `house_lists` (
  `house_id` INT(10) UNSIGNED NOT NULL,
  `world_id` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `listid` INT(11) NOT NULL,
  `list` text NOT NULL,
  UNIQUE KEY `house_id` (`house_id`,`world_id`,`listid`),
  FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE
) ENGINE=InnoDB;
 
CREATE TABLE `tile_items` (
  `tile_id` INT(10) UNSIGNED NOT NULL,
  `world_id` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `sid` INT(11) NOT NULL,
  `pid` INT(11) NOT NULL DEFAULT '0',
  `itemtype` INT(11) NOT NULL,
  `count` INT(11) NOT NULL DEFAULT '0',
  `attributes` BLOB NOT NULL,
  UNIQUE KEY `tile_id` (`tile_id`,`world_id`,`sid`),
  KEY `sid` (`sid`),
  FOREIGN KEY (`tile_id`) REFERENCES `tiles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;
 
Still not working
SQL:
SQL-query:

CREATE TABLE `tile_items` (
`tile_id` INT( 10 ) UNSIGNED NOT NULL ,
`world_id` tinyint( 2 ) UNSIGNED NOT NULL DEFAULT '0',
`sid` INT( 11 ) NOT NULL ,
`pid` INT( 11 ) NOT NULL DEFAULT '0',
`itemtype` INT( 11 ) NOT NULL ,
`count` INT( 11 ) NOT NULL DEFAULT '0',
`attributes` BLOB NOT NULL ,
UNIQUE KEY `tile_id` ( `tile_id` , `world_id` , `sid` ) ,
KEY `sid` ( `sid` ) ,
FOREIGN KEY ( `tile_id` ) REFERENCES `tiles` ( `id` ) ON DELETE CASCADE
) ENGINE = InnoDB;

MySQL retourneerde: Documentatie
#1005 - Can't create table 'otserv.tile_items' (errno: 150)
 
All right, so you probably need the table `tiles` as well. It appears to me that you do not even have half of the original database schema, so why not just re-upload the default one you get from downloading TFS?
 
I'm afraid I am just about to call it the night. I'll be more than happy to assist you through teamviewer/private messages by tomorrow though.
 
Back
Top