View Single Post
  #1  
Old 08-28-2019, 12:47 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default Advnpcspawn maketype error

This query is generating an error, but I can't see why based on the query that I think is doing the insert. The code has an int32 value of 28, but the error is showing 734375700. Any ideas?

Code:
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, %i, %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);

Error:
Code:
[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("a", 1, 1, 1, 
11, 0, 0, 0, 
6.000000, 0, 0, 0, 
0.000000, 28, 734375700)
Reply With Quote