PDA

View Full Version : #npcspawn add error.. nasty


gernblan
10-16-2007, 09:36 PM
I'm getting this error in our server log output when I do a dbspawn and then npcspawn add of a mob...


ReturnFalse: spawngroup query in NPCSpawnDB() (query: INSERT INTO spawngroup (name) values('growthplanea_serene_forest_spirit026133762 48'))


Because of that, I imagine, the new spawnpoint isn't getting added to the db and we cannot spawn any more new mobs.

So something is wrong, very wrong.

Please, can anyone translate this error for me, tell me what is causing it and maybe tell me how to fix ti?

I would be most grateful.

Sakrateri
10-17-2007, 12:02 AM
#npcspawn add? Try a #dbspawn and then #npcspawn create

hope that works for you.

moydock
10-17-2007, 05:46 AM
In theory #npcspawn add should work. add puts it into everything except npc_types. Create puts it into everything, never tried it but i would think that would make duplicate entries in your npc_types table.

Sakrateri
10-17-2007, 06:15 AM
I use create all the time and have had no duplicates as it adds a number to the end of each mob eg, An_Orc01, An_Orc02 you can dbspawn ten mobs and do create on each and each one would have a diff number added in succession. I have never used Add so I can't comment on that command though.

gernblan
10-17-2007, 01:11 PM
Figured out the problem... the field simply ran out of characters... long mobname + spawngroup number and it ran out. Increasing the size of the field (to, in my case, varchar(50)) gave it room and it was able to update.

gernblan
10-17-2007, 01:14 PM
And here is the difference between #npcspawn add and create:

create - literally creates a NEW mob in the database. New NPCID. New spawngroup. Use SPARINGLY because you'll have tons of mobs to edit.

add - only creates a new spawnpoint for that mob in the same spawngroup of the mob you're spawning. The mob must already exist in the DB and have a spawngroup ID (meaning, usually a mob you dbspawned from somewhere else).

So, create will create a completely new mob (NPCID, spawngroupID, first spawnpoint) and add will create an addition spawnpoint for a mob, with the same NPCID of what you copied along with it's spawngroup, merely adding a new spawnpoint for it.

add creates mobs with the same NPCID, same spawngroup, different spawn points... so if you edit the texture, hp, other stats... of any one of them, you edit them all (very nice when you're merely making clones).

create creates a brand new, standalone mob in all respects.

Sakrateri
10-17-2007, 05:18 PM
Well that explains it then, all of the mobs I spawn I create myself. I am not wanting to fill my zones with all the same mobs, Thanks for the info :)