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

Solved Guild with ID:0 doesnt exist gesior for tfs 1.2

jimmydunphy

New Member
Joined
Aug 9, 2007
Messages
68
Reaction score
3
Location
Nova Scotia Canada
I get this error after creating the guild, anyone know how to fix?

The Following Errors Have Occurred:
  • Guild with ID 0 doesn't exist.

EDIT: Big thanks to @Shadow Dan and @imkingran for helping me get through this! I couldn't figure out how to delete my table on phpMYadmin because I had foreign key checks enabled, once I disabled that I was able to delete the entire table and reload the sql code into the database and it works now :) Thanks again guys!!
 
Last edited:
CREATE TABLE IF NOT EXISTS `guilds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`guild_logo` mediumblob,
`create_ip` int(11) NOT NULL DEFAULT '0',
`balance` bigint(20) unsigned NOT NULL DEFAULT '0',
`last_execute_points` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
UNIQUE KEY `ownerid` (`ownerid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=47 ;`

I've added that into my schemal.sql file and it still wont create the tables in phpmyadmin.
dot.gif
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0056 seconds.)
SELECT * FROM `guilds`
Profiling
[ Edit inline ] [ Edit ] [ Explain SQL ] [ Create PHP code ] [ Refresh ]
Query results operations Create view
 
CREATE TABLE IF NOT EXISTS `guilds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`guild_logo` mediumblob,
`create_ip` int(11) NOT NULL DEFAULT '0',
`balance` bigint(20) unsigned NOT NULL DEFAULT '0',
`last_execute_points` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
UNIQUE KEY `ownerid` (`ownerid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=47 ;`

I've added that into my schemal.sql file and it still wont create the tables in phpmyadmin.
dot.gif
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0056 seconds.)
SELECT * FROM `guilds`
Profiling
[ Edit inline ] [ Edit ] [ Explain SQL ] [ Create PHP code ] [ Refresh ]
Query results operations Create view

Do you mean you weren't able to add the Guilds table into your database?
Or that you have the Guilds table but it's not inserting any data into there?

If it's the first question then try this:

1. Go to phpMYadmin
2. Select your database
3. Click on SQL
4. Now paste in that query and click go:
Code:
CREATE TABLE IF NOT EXISTS `guilds` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `ownerid` int(11) NOT NULL,
  `creationdata` int(11) NOT NULL,
  `motd` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `guild_logo` mediumblob,
  `create_ip` int(11) NOT NULL DEFAULT '0',
  `balance` bigint(20) unsigned NOT NULL DEFAULT '0',
  `last_execute_points` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `ownerid` (`ownerid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=47 ;`

If it's the second question then pass us your guilds.php page and maybe someone will be able to help you.
 
Thank you for your reply! I have the "Guilds" table in phpMYadmin, it just shows nothing and when I add that code the way you've said nothing changes ;/ I'm confused on what to do from here to fix this guilds error
 
Did you try making a new guild and testing it again after you tried the query?

Yes I did. I've even restarted everything from scratch, nothing seems to work. I think this is an issue with Gesior, but my messages go un-answered to him. I'm not sure how to fix this. I've used other guilds.php, I've added those tables to my schema, i've added them to mysql database, nothing works.
 
If anyone has a working guilds.php for Gesior and tfs 1.2 I would greatly appreciate if you would send it to me! Even after adding all these tables in one by one on phpMYadmin the same error occurs!
 
I am now 100% certain that for whatever reason, guilds are not saving in phpMYadmin. I think I have all the correct Columns ( I have 10 in total, ID, Name, Ownerid, creationdata, motd, description, guild_logo, create_ip, balance, last_execute_points ) I have a primary key on ID and unique keys on name and ownerid yet when I make a guild I get the error "Guild with ID:0 does not exist." when I change the URL from 0 to 1 I get the same message, just with guild ID 1 does not exist. How do I make my guilds save to phpMYadmin?
 
@Gesior.pl @Ninja I know you're both probably super busy but could either of you help me with this issue? I'm growing super frustrated, I'm ready to pay someone to do it lol. It seems like for some reason it just wont save and I know absolutely nothing about codes and can't figure it out. I think if there is anything wrong its between lines 1063 and 1287. It lets me create the guild, but it won't save it ;/
 
Back
Top