PDA

View Full Version : Having trouble with bot creation on my server


permaxx
07-06-2011, 06:34 AM
Hello all,
I am having some bot creation trouble. When i try to create a bot it tells me the name is already being used. This happens for any name that I try, so I can't spawn even one bot. If someone has any ideas on how to go about fixing this problem, it would be greatly appreciated.

thx~

mamba700
07-30-2011, 04:48 PM
I had the same problem. It seems related to this view that needs to be created. I get a syntax error when trying to run this as a query in MYSQL 5.045

it stops on "union all"

errormessage is "1271 - Illegal mix of collations for operation 'UNION'

if I only create the view to read from character_ without the union it seems to work, however I will likely have problems as it seems this view helps prevent duplicate names for bots as it compares character names as well as bot names for duplicates.

Sure enough I can create the bots now but it allows duplicate bot names which really messes things up.

If anyone can fix the syntax in the view create below it would be much apprecieated.


DROP VIEW IF EXISTS `vwBotCharacterMobs`;
CREATE VIEW `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;

mamba700
08-02-2011, 12:39 PM
OK I have it fixed now and runs fine.

Here is what needs to be done. The operation of UNION ALL requires that the fields are the same character set.

So check bots and character_ tables. Look in each field for the character set. Change the set to match the other table.

So Specifically i looked at 'Name' in table character_ and it shows character set = latin1 collation = latin1_swedish_ci

So I then go to the same field in table bots and change it to match. Once this was done the view was created with no errors.

I hope this helps other folks with the same problem.