View Full Version : Mysql error Deleting characters
Nightrider84
07-15-2015, 03:23 AM
This is the error I get whenever I delete a character.
[MySQL Error] 1305: FUNCTION peq.GetMobTypeById does not exist
DELETE FROM `guild_members` WHERE `char_id` = '634' AND GetMobTypeById(1070934671) = 'C'
any info for this would be great, It doesn't seem to effect anything that I can see but its an error non the less that I wan't to go away =P
joligario
07-15-2015, 06:51 AM
How are you deleting the character? What tool, cmd, etc.?
Taleason
07-15-2015, 08:07 AM
Try this
DROP FUNCTION IF EXISTS `GetMobTypeById`;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `GetMobTypeById`(mobid INTEGER UNSIGNED) RETURNS char(1) CHARSET latin1
BEGIN
DECLARE Result CHAR(1);
SET Result = NULL;
IF (select id from character_ where id = mobid) > 0 THEN
SET Result = 'C';
ELSEIF (select BotID from bots where BotID = mobid) > 0 THEN
SET Result = 'B';
END IF;
RETURN Result;
END;;
DELIMITER ;
Nightrider84
07-15-2015, 10:44 AM
just at the character select screen, it pops up on my world.exe. I'll try that taleason and get back to ya
Nightrider84
07-15-2015, 11:00 AM
That did the trick taleason, I've never been very good with code im glad that you figured it out. What was the issue btw?
Taleason
07-16-2015, 06:56 AM
[MySQL Error] 1305: FUNCTION peq.GetMobTypeById does not exist
Your DB was missing that particular function.
Happy it fixed it for you.
Nightrider84
07-16-2015, 10:16 AM
what does the function actually do so I have a reference for it
NatedogEZ
07-16-2015, 10:57 AM
The function is called when deleting members from a guild
Nightrider84
07-16-2015, 11:06 AM
Thank you nate
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.