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

Elfs Warsystem

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Reaction score
5
Location
Halland - Getinge
When people get killed in war mode i get this message in console:

24edsm0.png


Does anyone know what the problem is?
 
Import this and it will be fixed :)

Lua:
CREATE TABLE IF NOT EXISTS `guild_wars` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `guild_id` INT NOT NULL,
  `enemy_id` INT NOT NULL,
  `begin` BIGINT NOT NULL DEFAULT '0',
  `end` BIGINT NOT NULL DEFAULT '0',
  `frags` INT UNSIGNED NOT NULL DEFAULT '0',
  `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
  `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
  `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
  `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `status` (`status`),
  KEY `guild_id` (`guild_id`),
  KEY `enemy_id` (`enemy_id`)
) ENGINE=InnoDB;
 
ALTER TABLE `guild_wars`
  ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
 
ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;
 
CREATE TABLE IF NOT EXISTS `guild_kills` (
  `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `guild_id` INT NOT NULL,
  `war_id` INT NOT NULL,
  `death_id` INT NOT NULL
) ENGINE = InnoDB;
 
ALTER TABLE `guild_kills`
  ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
 
ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;
 
yes but when i try it doesnt take this line:

ALTER TABLE `guild_wars`
ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

and this

ALTER TABLE `guild_kills`
ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

and get this

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `guild_wars` ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guil' at line 1
 
Back
Top