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

Castle Event Talkaction error

ssiwyy158

Member
Joined
Jan 24, 2011
Messages
130
Solutions
2
Reaction score
14
Hello. Errors on console:
3a64ee205b183.png


Script:
Wklejka #3246775 – Wklej.org

Can anyone help me?

Version TFS 0.4 rew 3884
 
Last edited by a moderator:
Do you have the database schema for those queries?
Mods are normally a huge mess to get good error messages from, so start with that.

Yes

Code:
ALTER TABLE players ADD ip varchar(255) NOT NULL
CREATE TABLE `castle_fighters` (
  `id` INT(11) NOT NULL,
  `guild` INT(11) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
CREATE TABLE `castle` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `owner` INT(11) NOT NULL,
  `guild_name` VARCHAR(99) NOT NULL,
  `king` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE `castle_dmg` (
  `guild` INT(11) NOT NULL,
  `dmg` INT(11) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
CREATE TABLE `events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event_name` varchar(255) NOT NULL,
  `winner_name` varchar(255) NOT NULL,
  `won_item` varchar(255) NOT NULL,
  `time_win` int(7) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=45 ;
 
Yes

Code:
ALTER TABLE players ADD ip varchar(255) NOT NULL
CREATE TABLE `castle_fighters` (
  `id` INT(11) NOT NULL,
  `guild` INT(11) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
CREATE TABLE `castle` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `owner` INT(11) NOT NULL,
  `guild_name` VARCHAR(99) NOT NULL,
  `king` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE `castle_dmg` (
  `guild` INT(11) NOT NULL,
  `dmg` INT(11) NOT NULL
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
CREATE TABLE `events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event_name` varchar(255) NOT NULL,
  `winner_name` varchar(255) NOT NULL,
  `won_item` varchar(255) NOT NULL,
  `time_win` int(7) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=45 ;

Ok in that case check if you are checking the correct value.
Is it checking the player id (server side) or is it using the GUID (database side)
 
is using the guid

That was just an example, you have to make sure you are comparing the correct thing and that the schema exists for that thing.
In some cases it's easier to convert the script to seperated Lua scripts and see where you get the error.

Did you just install this script or did it work before? etc
 
That was just an example, you have to make sure you are comparing the correct thing and that the schema exists for that thing.
In some cases it's easier to convert the script to seperated Lua scripts and see where you get the error.

Did you just install this script or did it work before? etc

I installed mod only and script didn't work before :(
 
Where did you get the mod?
Has other ppl been able to install it?

My guess (if others can run it) is that you didn't install all of the schema.

Code:
https://tibia.net.pl/threads/586979-Castle-War?p=1717690#post1717690


I added everything to the database :(
 
And the script is for the correct server?
If it works for other people and you installed it correctly you must have done something wrong.

Yep script is for tfs 0.3.6/0.4.

SOLVED:
I set manually castle owner and event properly started
 
Last edited:
Back
Top