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

Error Guild System

SrClound

New Member
Joined
Dec 9, 2014
Messages
8
Reaction score
0
Hi, i have problem saving created guilds in my server
I am using TFS 0.4 r3884

When i try to create guild in website i get a blank page

qHjH7MN.png

tz3uxbf.png

AFievP5.png


So, i activate ingame commands and try to create a guild ingame but server dont save it
But i got message
Guild Created "Demacia"
but i look on me and i dont say i am in a guild, and i dont have guild channel
And i can do !Guild create Demacia infinite times and it always say
Guild Created "Demacia"

Someone helpme plis :(

I dont know how this happen because some time ago i can create guilds and now i cant :/
 
The blank page is caused by an error. Either check your error log, or enable error reporting for your application.
PHP:
// Remove these once you have solved your issue.
ini_set('display_errors', true);
error_reporting(E_ALL);
 
@Chris
Notice: Undefined index: sqliteDatabase in C:\UniServerZ\www\Global\config-and-functions.php on line 23 Notice: Undefined index: passwordType in C:\UniServerZ\www\Global\config-and-functions.php on line 27 Notice: Undefined index: account_login in C:\UniServerZ\www\Global\index.php on line 42 Notice: Undefined index: password_login in C:\UniServerZ\www\Global\index.php on line 43 Notice: Undefined variable: time in C:\UniServerZ\www\Global\guilds.php on line 1131 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'' in C:\UniServerZ\www\Global\pot\OTS_Guild.php:178 Stack trace: #0 C:\UniServerZ\www\Global\pot\OTS_Guild.php(178): PDO->query('INSERT INTO `gu...') #1 C:\UniServerZ\www\Global\guilds.php(1134): OTS_Guild->save() #2 C:\UniServerZ\www\Global\index.php(155): include('C:\\UniServerZ\\w...') #3 {main} thrown in C:\UniServerZ\www\Global\pot\OTS_Guild.php on line 178
 
Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'.

My first guess would be that the guilds table in your database, doesn't have an auto incremental value for its ID. Can you confirm this?
 
Execute the following SQL query through your database handler (most likely phpMyAdmin), and give me the results of the 'Create Table' column.
Code:
SHOW CREATE TABLE guilds;
 
@Chris
I got this
Xl9OjDM.png


CREATE TABLE `guilds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`checkdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL,
`balance` bigint(20) unsigned NOT NULL,
`description` text NOT NULL,
`logo_gfx_name` varchar(255) NOT NULL DEFAULT '',
`join_date` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`world_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8
 
Okay, so you do have an auto-incremental field. The problem instead, seems to lie with the unique key. Are you trying to create a guild that already exists on the same world?
 
@Chris
no, i dont have guilds in my server, i try using !createguild command in my server and i get message
Guild created "Example"
but i dont have guild channel or when i look on my i dont have guild
And also i can do infinite times !create guild example
and always get
Guild created "Example"
Guild created "Example"
Guild created "Example"
Guild created "Example"
Guild created "Example"
Guild created "Example"
Guild created "Example"

u understand? :p my english sucks
 
Try running the following SQL query, and see if you get any results, please.
Code:
SELECT name, world_id FROM guilds;
 
Do you have TeamViewer? If so, please send me a private message with your credentials and I'll attempt to sort this out for you.
 
Send me your TeamViewer credentials tomorrow, or whenever you have time, and we'll figure it out.
 
I try to keep my Skype to business related contacts and/or people I've known for a while. We can talk through the native chat functionality that TeamViewer provides. I'm off to bed right now though, send me a private message whenever you're ready and I'll respond as soon as I see it.
 
Back
Top