Log in

View Full Version : Problem sourcing bots using setup guide on wiki


Eva Aisling
02-24-2010, 04:10 PM
I'm having trouble sourcing "load_bots.sql" with peqdb_rev1180a-Bots. Sourcing "peqdb_rev1052.sql" and "load_player.sql" completed successfully. With "load_bots.sql" I get the following errors:

ERROR 1146 <42S02>: Table 'peq.bots' doesn't exist
Query OK, 0 rows affected, 1 warning <0.00 sec>

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'IF NO
T EXISTS `vwGuildMembers` AS
select 'C' as mobtype,
cm.char_id,
cm.guild_' at line 1
Query OK, 0 rows affected, 1 warning (0.00 sec)

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'IF NO
T EXISTS `vwBotCharacterMobs` AS
select 'C' as mobtype,
c.id,
c.name,
c.c' at line 1
mysql>

I am using MySQL version 5.1. I would appreciate any help.

pfyon
02-24-2010, 04:14 PM
Check load_bots.sql and make sure the first line is
source player_tables/bots.sql

I think there was/is a problem where it didn't source bots.sql before sourcing the other sql files that rely on a bot table existing.

Eva Aisling
02-24-2010, 04:24 PM
Thanks! That got rid of the first error, but I still have these:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'IF NO
T EXISTS `vwGuildMembers` AS
select 'C' as mobtype,
cm.char_id,
cm.guild_' at line 1
Query OK, 0 rows affected, 1 warning (0.00 sec)

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'IF NO
T EXISTS `vwBotCharacterMobs` AS
select 'C' as mobtype,
c.id,
c.name,
c.c' at line 1


I'm scanning the manual right now, but I honestly have no idea what I'm looking for.

Derision
02-24-2010, 04:28 PM
Edit your bots.sql and wherever you see CREATE VIEW IF NOT EXISTS (I think there are only two occurrences of it), change it to CREATE VIEW (i.e. drop the IF NOT EXISTS clause).

Eva Aisling
02-24-2010, 04:46 PM
That worked on the next 2 errors. Thank you!

Now I have a new error:

ERROR 1146 (42S02): Table 'peq.botguildmembers' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)

EDIT: I opened load_bots.sql and moved the line "source player_tables/botguildmembers.sql;" to the top of list above "source player_tables/bots.sql;" and it works! Thanks so much for help guys!

Derision
02-25-2010, 09:29 AM
The correct order of statements in load_bots.sql appears as if it should be:

source player_tables/botguildmembers.sql;
source player_tables/bots.sql;
source player_tables/botadventuring.sql;
source player_tables/botbuffs.sql;
source player_tables/botpetstatepersists.sql;
source player_tables/botinventory.sql;
source player_tables/botgroups.sql;


Edit: Oops, didn't notice that you edited your last post to say that you already got it working :)