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

Linux "/war invite" problem

Vendeliko

Banned User
Joined
Dec 3, 2011
Messages
3,087
Reaction score
90
Location
Beside that guy with that thing but without that t
Hey guys,tried adding war system today to my server and when inviting a player I get
Code:
[19:47:37.974] mysql_real_query(): SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (3,4) AND `enemy_id` IN (4,3) AND `status` IN (0, 1) - MYSQL ERROR: Unknown column 'status' in 'field list' (1054)

[19:47:37.974] [Error - TalkAction Interface] 
[19:47:37.974] data/talkactions/scripts/war.lua:onSay
[19:47:37.974] Description: 
[19:47:37.974] data/talkactions/scripts/war.lua:133: attempt to call field 'executeQuery' (a nil value)
[19:47:37.974] stack traceback:
[19:47:37.974] 	data/talkactions/scripts/war.lua:133: in function <data/talkactions/scripts/war.lua:1>

and nothing happens in game.

When trying to execute required db stuff I get this
Code:
Error

Zapytanie SQL:

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 ;

MySQL zwrócił komunikat: Dokumentacja
#1005 - Can't create table 'prodatebasename.#sql-5c9_1586' (errno: 121) (Szczegóły...)

and in guild_wars there is only 3 tables, id,guild_id and enemy_id and I can not delete them or the whole guild_wars
because it says it was succesful but they are still there.



Hope someone can please help me quickly.


Thanks in advance,
Vendeliko.
 
I think this is not Linux problem

- - - Updated - - -

If you dont added the querys, try add this

SQL:
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;
 
execute this in your mysql
Code:
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;

NOTE: first delete the table "guild_wars"
 
Back
Top