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

Lua Need help with war.lua

niti

New Member
Joined
Nov 22, 2009
Messages
258
Reaction score
2
Hello everyone, I'm kinda stuck at the WAR.LUA so I need some help here,

When I go on the website and click on the WAR.LUA it says like this

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'albenitful.guild_wars' doesn't exist' in C:\xampp\htdocs\wars.php:41 Stack trace: #0 C:\xampp\htdocs\wars.php(41): PDO->query('SELECT * FROM `...') #1 C:\xampp\htdocs\index.php(196): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\wars.php on line 41

I'm not sure which WAR I'm using but my gesior is, 0.6.2!

And the commands doesn't work either /war invite, .... , 100. Could someone help me out? I'm stuck at that..
 
Isn't script problem, your database is just missing guild_wars table. Execute this query on PMA:

SQL:
CREATE TABLE `guilds`
(
`id` INT NOT NULL AUTO_INCREMENT,
`world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
`name` VARCHAR(255) NOT NULL,
`ownerid` INT NOT NULL,
`creationdata` INT NOT NULL,
`checkdata` INT NOT NULL,
`motd` VARCHAR(255) NOT NULL,
`balance` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE (`name`, `world_id`)
) ENGINE = InnoDB;

CREATE TABLE `guild_invites`
(
`player_id` INT NOT NULL DEFAULT 0,
`guild_id` INT NOT NULL DEFAULT 0,
UNIQUE (`player_id`, `guild_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `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,
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`war_id`) REFERENCES `guild_wars`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `guild_ranks`
(
`id` INT NOT NULL AUTO_INCREMENT,
`guild_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
`level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
PRIMARY KEY (`id`),
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `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`),
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`enemy_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB;
 
NG89S.jpg


R++ if helped ;)
 
Back
Top