DedicatedOT
New Member
This is a dump of my guild sql:
How come whenever anybody execute the !createguild function, the server crashes?
Im running TFS 0.2.3 Mystic Spirit.
Here is the createguild function
ioguild.cpp
I will seriously pay you if you help me with a solution. It simply crashes. It doesn't have an error read out that I can see...
Please help. I got this problem ever since I attempted to install Gresior's Account AC, which added a column of "logo_gfx_name," -- I later deleted that column.
Code:
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `guilds` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL COMMENT 'guild name - nothing else needed here',
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL,
`logo_gfx_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `guilds`
--
INSERT INTO `guilds` (`id`, `name`, `ownerid`, `creationdata`, `motd`, `logo_gfx_name`) VALUES
(1, 'Test', 2, 1245621281, 'Your guild has successfully been created, to view all available commands use: <!commands>. If you would like to remove this message use <!cleanmotd>, if you would like to edit it, use <!setmotd newMotd>.', ''),
(2, 'Elementals', 14, 1245628487, 'Your guild has successfully been created, to view all available commands use: <!commands>. If you would like to remove this message use <!cleanmotd>, if you would like to edit it, use <!setmotd newMotd>.', ''),
(3, 'Hello', 2, 1245640873, 'Your guild has successfully been created, to view all available commands use: <!commands>. If you would like to remove this message use <!cleanmotd>, if you would like to edit it, use <!setmotd newMotd>.', '');
How come whenever anybody execute the !createguild function, the server crashes?
Im running TFS 0.2.3 Mystic Spirit.
Here is the createguild function
Code:
bool IOGuild::createGuild(Player* player)
{
Database* db = Database::getInstance();
if(!db->connect())
return false;
DBQuery query;
DBResult result;
query << "INSERT INTO `guilds` ( `id` , `name` , `ownerid` , `creationdata` , `motd` ) VALUES (NULL , '" << Database::escapeString(player->getGuildName()) << "', '" << player->getGUID() << "', '" << time(NULL) << "', 'Your guild has successfully been created, to view all available commands use: <!commands>. If you would like to remove this message use <!cleanmotd>, if you would like to edit it, use <!setmotd newMotd>.');";
if(!db->executeQuery(query))
return false;
query << "SELECT `id` FROM `guilds` WHERE `ownerid` = " << player->getGUID();
if(!db->storeQuery(query, result))
return false;
player->setGuildId(result.getDataInt("id"));
player->setGuildLevel(GUILDLEVEL_LEADER);
return true;
}
I will seriously pay you if you help me with a solution. It simply crashes. It doesn't have an error read out that I can see...
Please help. I got this problem ever since I attempted to install Gresior's Account AC, which added a column of "logo_gfx_name," -- I later deleted that column.