View Full Version : #npcspawn add bug....
Cripp
08-22-2004, 10:28 AM
HI, i am getting this error in zone.exe when using #npcspawn add...
ReturnFalse: spawngroup query in NPCSpawnDB() (query: INSERT INTO spawngroup (name) values('pooop005515265'))
i spawned the first couple hundred NPCS in my zone and it all of the sudden started doing this...
any help would be GREATLY appreciated.
Cisyouc
08-22-2004, 12:25 PM
HI, i am getting this error in zone.exe when using #npcspawn add...
ReturnFalse: spawngroup query in NPCSpawnDB() (query: INSERT INTO spawngroup (name) values('pooop005515265'))
i spawned the first couple hundred NPCS in my zone and it all of the sudden started doing this...
any help would be GREATLY appreciated. pooop005515265?
Cripp
08-22-2004, 12:58 PM
lol replaced the real thing with that for my own reasons :D now.. anyone have any clue wtf this is all about?
mattmeck
08-22-2004, 01:00 PM
ReturnFalse: spawngroup query in NPCSpawnDB() (query: INSERT INTO spawngroup (name) values('pooop005515265'))
Tried more fiber?
killspree
08-22-2004, 02:41 PM
Try using create instead of add - it seems to work fine.
Cripp
08-22-2004, 03:01 PM
yea but, when i use create, SOMETIMES it adds the npcs to the spawn tables and sometimes it doesnt.. its wierd. in this case it didnt add to spawn tables, so i had to #npcspawn add the npcID so he was in spawn tables. (hope that made any sense lol)
sotonin
08-22-2004, 05:34 PM
all create does is add a new NPC_TYPE record in the database. a copy of whatever you have targeted. doesnt add the spawn
Cisyouc
08-22-2004, 05:44 PM
all create does is add a new NPC_TYPE record in the database. a copy of whatever you have targeted. doesnt add the spawnI beg to differ, it puts it in npc_types as well as putting it in spawns.
killspree
08-22-2004, 07:28 PM
Yep, what Cisyouc said. It puts it in both - check the code. :P
Cisyouc
08-22-2004, 07:44 PM
I don't usually use the #spawn commands, but I assume how its supposed to work is you login,
#spawn A_Mob 6 70 ...
/targ A_Mob00
#npcspawn Create
(Restart Zone)
/targ A_Mob00
#npcstats
Name: A_Mob00
NPCID: 000001
...
...
#dbspawn 000001
#dbspawn 000001
#dbspawn 000001
/targ A_Mob01
#npcspawn add
/targ A_Mob02
#npcspawn add
/targ A_Mob03
#npcspawn add
Yes, no?
Rogean
08-22-2004, 08:04 PM
NPCSpawn Create does both adding it into the npc_type table AND spawn tables. The professional way of spawning a zone would be to first #spawn a mob, then npcspawn create him.. get his npcid (Restart the zone if you have to) and then dbspawn that mob where you want it again and then npcspawn add.
The problem you are having is most likely due to the name field in the spawngroup table not having the proper length. Try increasing the varchar length (You can do this using a tool like mysqlcc).
sotonin
08-23-2004, 01:04 AM
ah ok. clears some things up.
all i know was it always created a new entry for the mob, so when people always say, use npcspawn create i laugh and just know their npc_types table is 40 million records long )
jimbox114
08-23-2004, 04:34 AM
I have had some trouble with certain zones not working right with the npcspawn add. For instance in POI I spawned A_Giant_Clockwork, did the npcspawn create, rebooted zone and then dbspawned/npcspawn add about 20 of them. Went back in later and only 4 of them showed up. So I thought maybe I screwed up so I did the dbspawn/npcspawn add again in the same spots. Once again when I restart the zone they are not there. So I open up eqadmin and look in the npc_spawns section and see they are not there. Plane of Innovation and Plane of Growth are the only two zones I had this problem. The odd thing is I had created 2 other types of spawns in poi and I had no trouble populating the zone with dbspawn/npcspawn add using them.
Cripp
08-23-2004, 06:33 AM
found the problem... you cant use ' in the npc names.
my npc name was Lady_Poop's_Guard and it wouldnt add. changed to Lady_Poops_Guard and it added fine. after i found this out i noticed that all the other npcs that had the same error did have ' in there name.i did raise the var size on name in spawngroup too, but i think the main problem was the '. you can still use ' in the name, as long as you put it in there after you add it to spawn tables :D
Cisyouc
08-23-2004, 08:47 AM
found the problem... you cant use ' in the npc names.
my npc name was Lady_Poop's_Guard and it wouldnt add. changed to Lady_Poops_Guard and it added fine. after i found this out i noticed that all the other npcs that had the same error did have ' in there name.i did raise the var size on name in spawngroup too, but i think the main problem was the '. you can still use ' in the name, as long as you put it in there after you add it to spawn tables :DHmm... ` usually works for me. (Not ', ` (next to the 1 on your keyboard))
Cripp
08-23-2004, 10:44 AM
ya ` works but not '
animepimp
08-23-2004, 04:02 PM
I believe that %' is an escape character in SQL that says to the DB to process it as a ' instead of the end of a string since thats what 's are usually used for. The ' was saying the string was over and the DB couldn't match the normal ' at the end to anything so it failed. You can also do the same thign for a few other special characters, like %% inserts a %. And I could be completely wrong of course, but I do beleive from my SQL class two years ago that is the right way to do it.
sotonin
08-23-2004, 04:22 PM
i used % in mysql as a wildcard character.
SELECT ALL FROM npc_types WHERE name LIKE '%goblin%';
selects all things containing goblin in the name.. Dunno if this is at all related.. but .. ya there ya have it )
So if as you said %' was an escape... the above wouldn't in theory work.
animepimp
08-23-2004, 04:46 PM
Yeah, my memory was faulty, big suprise. I now remember (with google's help) that SQL uses the standard backslash as the escape character. So you can do \' or whatever to make SQL ignore it and put it into the DB as a quote. This will probably display weirdly when you first spawn the npc, it might show their name as "Bob\'s Cow" until you shut down the zone and restart it because the code will see the \ until it writes to the DB and reads it back, but it should work once the NPC is loaded fromt he DB.
PS I think i remember now that the %% thing came C in printf and scanf methods. Sorry for my brain farts.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.