Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-01-2015, 09:02 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default Weird MySQL error with #spawn/#npcspawn create

I got the latest code from Github and compiled and copied over, and decided to try out #spawn and #npcspawn create and #npcedit, but I am getting the oddest error when using #spawn and #npcspawn create.

I'll make a hotkey or manually type out the #spawn command:

Quote:
#spawn WoodElf 4 25 0 - 1 0 0 0 0 1
Then manually type out:
Quote:
#npcspawn create
And I'll get the following error in red in my chat window:

Quote:
08-01-2015 :: 17:41:11] [MySQL Error] 1264: Out of range value for column 'sec_melee_type' at row 1
INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) VALUES("WoodElf", 25, 4, 0, 723, 1, 0, 0, 0.000000, 0, 0, 0, 0.000000, 28, -1508384059)
The last value is for a byte, and should be 28 like prim_melee_type, and not just because it's in the spawn struct that way, but because it's actually been -hard coded- that way:

Quote:
zone/npc.cpp - Line 1059-1066

query = StringFormat("INSERT INTO npc_types (name, level, race, class, hp, gender, "
"texture, helmtexture, size, loottable_id, merchant_id, face, "
"runspeed, prim_melee_type, sec_melee_type) "
"VALUES(\"%s\", %i, %i, %i, %i, %i, %i, %i, %f, %i, %i, %i, %f, %i, %i)",
tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(),
spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(),
spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
auto results = QueryDatabase(query);
How in the world is sec_melee_type getting set to an arbitrary negative int32? I checked and double-checked the number of fields and values being passed, made sure there are as many %s/%i/%f format specifiers as arguments being supplied to StringFormat, and I'm just scratching my head.

I tried it both without (above) and with (below) the #npcspawn create extra parameter of 1:

Quote:
[08-01-2015 :: 18:05:01] [MySQL Error] 1264: Out of range value for column 'sec_melee_type' at row 1
INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) VALUES(54308, "WoodElf" , 25, 4, 0, 723, 1, 0, 0, 0.000000, 0, 0, 0, 0.000000, 28, -1508384059)
Anybody have an idea?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:26 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3