View Single Post
  #2  
Old 08-28-2019, 01:50 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I know there have been issues like this before in regards to string formatting.

The only thing I can think to try are these two changes:
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,"
	" %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, 
	(float)spawn->GetRunspeed(),
	28,
	28
);
The database storage type for `runspeed` is float and there could be a conversion issue in the interpreter.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote