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(" Error: Code:
[MySQL Error] 1264: Out of range value for column 'sec_melee_type' at row 1 |
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( |
Thanks for the response Uleat.
I tried %f and cast to float, unfortunately the same error is returned with the exception of that third last element now being a float. Which at least confirms I was looking at the right query. For context, I'm doing >spawn a >(target a) >advnpcspawn maketype Which is how I've gone about creating npcs>spawngroups>spawns in the past. It's been a few years since I was doing this though so this may be an old method that isn't maintained? |
Ok, if I change the last field value to an empty string, rather than int: 28, the last two field values get corrupted.
(error with) 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, 34383726, -2100638871) So I'm guessing there's a trailing character on the query string that is being incorrectly handled by the c_type function. |
This is messy, but it has fixed the error.
Code:
uint32 ZoneDatabase::AddNPCTypes(const char *zone, uint32 zone_version, Client *client, NPC *spawn, uint32 spawnGroupID) |
All times are GMT -4. The time now is 10:52 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.