Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2010, 09:02 PM
Nightlord
Sarnak
 
Join Date: Jun 2005
Posts: 37
Default Rev1054-Bots.sql syntax error

Updated my database from rev.1180a to database rev. 1265 and when I try to source Rev1054-Bots.sql it complains that there are two syntax errors in this. Anyone else get this error message?

Code:
alter table bots
add column `LastZoneId` smallint(6) NOT NULL DEFAULT '0';

CREATE TABLE IF NOT EXISTS `botguildmembers` (
  `char_id` int(11) NOT NULL default '0',
  `guild_id` mediumint(8) unsigned NOT NULL default '0',
  `rank` tinyint(3) unsigned NOT NULL default '0',
  `tribute_enable` tinyint(3) unsigned NOT NULL default '0',
  `total_tribute` int(10) unsigned NOT NULL default '0',
  `last_tribute` int(10) unsigned NOT NULL default '0',
  `banker` tinyint(3) unsigned NOT NULL default '0',
  `public_note` text NULL,
  PRIMARY KEY  (`char_id`)
) ENGINE=InnoDB;

DROP VIEW IF EXISTS `vwGuildMembers`;
CREATE VIEW IF NOT EXISTS `vwGuildMembers` AS
  select 'C' as mobtype,
cm.char_id,
cm.guild_id,
cm.rank,
cm.tribute_enable,
cm.total_tribute,
cm.last_tribute,
cm.banker,
cm.public_note
from guild_members as cm
union all
select 'B' as mobtype,
bm.char_id,
bm.guild_id,
bm.rank,
bm.tribute_enable,
bm.total_tribute,
bm.last_tribute,
bm.banker,
bm.public_note
from botguildmembers as bm;

DROP VIEW IF EXISTS `vwBotCharacterMobs`;
CREATE VIEW IF NOT EXISTS `vwBotCharacterMobs` AS
  select 'C' as mobtype,
c.id,
c.name,
c.class,
c.level,
c.timelaston,
c.zoneid
from character_ as c
union all
select 'B' as mobtype,
b.BotID as id,
b.Name as name,
b.Class as class,
b.BotLevel as level,
0 as timelaston,
0 as zoneid
from bots as b;

ALTER TABLE `guild_members` DROP PRIMARY KEY;
Anyone spot the errors here?
Reply With Quote
  #2  
Old 03-29-2010, 10:35 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

CREATE VIEW does not allow IF NOT EXISTS. Remove that portion of the view creation lines and it should work.
Reply With Quote
  #3  
Old 03-29-2010, 10:54 PM
Nightlord
Sarnak
 
Join Date: Jun 2005
Posts: 37
Default

That worked!
Thanks gaeorn.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:31 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3