Jump to content

Yang resets after relog/server restart.


Recommended Posts

Hello everyone. I hope you're having a wonderful day so far.

Today i tried raising the yang limit by some guide i found in another forum. I managed to implement everything and the limit is 100t. It works fine for the most part but the issue i'm currently facing with it is whenever i relog or restart the server the yang amount changes. For example: before i relog/restart i have in my inventory 100t yang, After i relog or restart : the yang in my invetory are 23 Quadrillion or 200/300yang.

I noticed that in my database (player>player) the gold amount is never the amount that i have in game. Also when i try changing the gold amount in the player table and save and re-open the table, the value resets itself to 0 or some random number.

I don't get any errors while compiling only some warnings that i didn't have before i changed the yang limit and i think they are related to the problem that i'm having but i'm not sure.

I get one warning when compiling the game src and that warning is:

locale_service.cpp: In function 'void __CheckPlayerSlot(const string&)':
locale_service.cpp:1029:10: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   printf("<ERROR> PLAYER_PER_ACCOUNT = %d\n", PLAYER_PER_ACCOUNT);

When i compile the db src i get these warnings :
 

Spoiler

ClientManagerPlayer.cpp: In function 'size_t CreatePlayerSaveQuery(char*, size_t, TPlayerTable*)':
ClientManagerPlayer.cpp:79:4: warning: format '%u' expects argument of type 'unsigned int', but argument 27 has type 'long long int' [-Wformat=]
    "UPDATE player%s SET "
    ^~~~~~~~~~~~~~~~~~~~~~
    "job = %d, "
    ~~~~~~~~~~~~
    "voice = %d, "
    ~~~~~~~~~~~~~~
    "dir = %d, "
    ~~~~~~~~~~~~
    "x = %d, "
    ~~~~~~~~~~
    "y = %d, "
    ~~~~~~~~~~
    "z = %d, "
    ~~~~~~~~~~
    "map_index = %d, "
    ~~~~~~~~~~~~~~~~~~
    "exit_x = %ld, "
    ~~~~~~~~~~~~~~~~
    "exit_y = %ld, "
    ~~~~~~~~~~~~~~~~
    "exit_map_index = %ld, "
    ~~~~~~~~~~~~~~~~~~~~~~~~
    "hp = %d, "
    ~~~~~~~~~~~
    "mp = %d, "
    ~~~~~~~~~~~
    "stamina = %d, "
    ~~~~~~~~~~~~~~~~
    "random_hp = %d, "
    ~~~~~~~~~~~~~~~~~~
    "random_sp = %d, "
    ~~~~~~~~~~~~~~~~~~
    "playtime = %d, "
    ~~~~~~~~~~~~~~~~~
    "level = %d, "
    ~~~~~~~~~~~~~~
    "level_step = %d, "
    ~~~~~~~~~~~~~~~~~~~
    "st = %d, "
    ~~~~~~~~~~~
    "ht = %d, "
    ~~~~~~~~~~~
    "dx = %d, "
    ~~~~~~~~~~~
    "iq = %d, "
    ~~~~~~~~~~~
    "exp = %u, "
    ~~~~~~~~~~~~
    "gold = %lld, "
    ~~~~~~~~~~~~~~~
    "stat_point = %d, "
    ~~~~~~~~~~~~~~~~~~~
    "skill_point = %d, "
    ~~~~~~~~~~~~~~~~~~~~
    "sub_skill_point = %d, "
    ~~~~~~~~~~~~~~~~~~~~~~~~
    "stat_reset_count = %d, "
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    "ip = '%s', "
    ~~~~~~~~~~~~~
    "part_main = %d, "
    ~~~~~~~~~~~~~~~~~~
    "part_hair = %d, "
    ~~~~~~~~~~~~~~~~~~
    #ifdef __SASH_SYSTEM__
    ~~~~~~~~~~~~~~~~~~~~~~
    "part_sash = %d, "
    ~~~~~~~~~~~~~~~~~~
    #endif
    ~~~~~~
    "last_play = NOW(), "
    ~~~~~~~~~~~~~~~~~~~~~
compiling ClientManagerBoot.cpp
    "skill_group = %d, "
    ~~~~~~~~~~~~~~~~~~~~
    "alignment = %ld, "
    ~~~~~~~~~~~~~~~~~~~
 #ifdef ENABLE_TITLE_SYSTEM
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "prestige = %ld, "
    ~~~~~~~~~~~~~~~~~~
 #endif
 ~~~~~~
    "horse_level = %d, "
    ~~~~~~~~~~~~~~~~~~~~
    "horse_riding = %d, "
    ~~~~~~~~~~~~~~~~~~~~~
    "horse_hp = %d, "
    ~~~~~~~~~~~~~~~~~
    "horse_hp_droptime = %u, "
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "horse_stamina = %d, "
    ~~~~~~~~~~~~~~~~~~~~~~
    "horse_skill_point = %d, "
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
ClientManagerPlayer.cpp:150:3:
   pkTab->gold,
   ~~~~~~~~~~~
ClientManagerPlayer.cpp:79:4: warning: format '%lld' expects argument of type 'long long int', but argument 28 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]

 

 

 

Navicat Player>Player>gold type is bigint and length 16. (tried 255 and nothing changed)


Thank you all in advance.

EDIT: Fixed. If you're dealing with the same issue, check your ClientManagerPlayer.cpp (CreatePlayerSaveQuery) and tables.h

Edited by Erebus
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.