Jump to content

-4629785096512077824


Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

.sql file?

Okey, but i think the problem somewhere in source.

http://pastebin.com/nPewvUhW

 

In clientmanagerplayer.cpp

see this:

 

queryLen = snprintf(queryStr, sizeof(queryStr), 
            "INSERT INTO player%s "
            "(id, account_id, name, level, st, ht, dx, iq, "
            "job, voice, dir, x, y, z, "
            "hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, part_acce, gold, playtime, "
            "skill_level, quickslot) "
            "VALUES(0, %u, '%s', %d, %d, %d, %d, %d, "
            "%d, %d, %d, %d, %d, %d, %d, "
            "%d, %d, %d, %d, %d, %d, %d, %d, 0, %lld, 0, ",

%lld <-- This is the gold. If i write this to 0, it's working, but that's a very very poor fix, i have to find the problem's real cause.

Edit: It's not caused by the gold int-->long long. It's worked me for a long time, maybe a new system wrong it. Example Offlineshop.

Link to comment
Share on other sites

You need to check if all the placeholders (not sure how to call them, but i'm talking about the %d etc) match the variable type you're feeding it. Example:

unsigned long long tmp = 50;

snprintf("INERT INTO test (gold, time) VALUES (%d, NOW())")

 

This will give you the error you're getting because it overflows. The correct format specifier would be %ulld.

Make sure all the format specifiers and variables match each other and you shouldn't get the error anymore.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.