EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   npc create not working... (https://www.eqemulator.org/forums/showthread.php?t=38382)

Bonehard 06-13-2014 03:06 PM

npc create not working...
 
Hello,
i have start to add npc's to my zone just for testing and have found a problem i can't fix.

first i start with the #spawn command to add npc to my location:

#spawn TestMob 303 85 0 10000 2

Thos works like it should.
The npc with the correct race shows up at my position.

To create a new entry to the npc_types table i do the #npcspawn create command:
( Npc selected )
#npcspawn create

I get the information that:
TestMob0000 was created successfully.

But the npc where not added to the npc_types table.
For testing i did after the #npcspawn created the #npcspawn add to have an entry to the spawn table.

When i look into the spawn2 table i got an new entry. And there is also an spawngroup entry and spawn event but the npc id is set to 0.

I did also some test an adding an npc via sql with id and without id to see if the auto-increment value is set correctly and it was working.

Anyone can give me some hints where my problem could be?
Sourcecode and database rev. should be up to date.
I did also look into the tutorials how to create npc. :)

NatedogEZ 06-13-2014 04:10 PM

type .. #logs all

Then try to #npcspawn create

It should give an SQL error if something goes wrong and spew the information into your chat box

Bonehard 06-13-2014 04:18 PM

hehe well 5 minutes before i read your answer i expanded the sourcecode to write out any error that the NPCSpawnDB function did.

so i got the error:
Field: special_abilities - doesn't have a default value.

Atm iam looking trough the svn/git sql. but cant find any that have special_abilities updates on the npc_type table.

Any hint what default value for the field?

Thanks :)

vsab 06-13-2014 05:08 PM

oh yeah, that's been broke a long while. I think it works OK on Linux but not on Windows? Just edit the default value to be an empty string.

Bonehard 06-13-2014 05:09 PM

Ok i found a solution.
Since the column for the special_abilities is a text column(Blob field) and i got a newer mysql version the default setting don't allow me to have a default value like '' for a text column.
Since i dont want to change the options of my database settings i did a temp table copied the values(id, special_abilities) into it.
I added another field to to npc_types from type varchar(255) than i copied the values from the temp table into the npc_types table using the new column.
i droped the column special_abilities and renamed the new field added to special_abitlies.
The new field from type varchar(255) can now be default ''.

Now it works to create new npc.

Thanks for help :)

Edit: sorry my english is really bad. hope you guys understand most of the technical aspect i was talking about :P


All times are GMT -4. The time now is 11:13 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.