Jump to content

problem mainline


Go to solution Solved by Denis,

Recommended Posts

Well dev, actually i have this problem:

 

With 40250k normal i can delete characters, but when i put my core i can't.

 

The error when i try to do is this:

SYSERR: Dec  6 17:16:07 :: DirectQuery: AsyncSQL::DirectQuery : mysql_query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '_deleted SELECT * FROM player  WHERE id=21317' at line 1
query: INSERT INTO player _deleted SELECT * FROM player  WHERE id=21317

:D

Link to comment
Share on other sites

  • Solution

Open ClientManagerPlayer.cpp from your db source and find this piece of code:

        snprintf(queryStr, sizeof(queryStr), "INSERT INTO player%s_deleted SELECT * FROM player%s WHERE id=%d",
                GetTablePostfix(), GetTablePostfix(), pi->player_id);
        std::auto_ptr<SQLMsg> pIns(CDBManager::instance().DirectQuery(queryStr));

        if (pIns->Get()->uiAffectedRows == 0 || pIns->Get()->uiAffectedRows == (uint32_t)-1)
        {
            sys_log(0, "PLAYER_DELETE FAILED %u CANNOT INSERT TO player%s_deleted", dwPID, GetTablePostfix());

            peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
            peer->EncodeBYTE(pi->account_index);
            return;
        }

and replace it to this(If you want to improve it you could make the deleted character data go to player_deleted,because I removed it here):

        snprintf(queryStr, sizeof(queryStr), "SELECT * FROM player%s WHERE id=%d",
                GetTablePostfix(), pi->player_id);
        std::auto_ptr<SQLMsg> pIns(CDBManager::instance().DirectQuery(queryStr));

        if (pIns->Get()->uiNumRows == 0)
        {
            sys_log(0, "PLAYER_DELETE FAILED %u CANNOT INSERT TO player%s_deleted", dwPID, GetTablePostfix());

            peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
            peer->EncodeBYTE(pi->account_index);
            return;
        }

The character delete was actually bugged in the mainline (I don't know for the other branches).

 

  • Love 3
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



  • Similar Content

  • Activity

    1. 113

      Ulthar SF V2 (TMP4 Base)

    2. 2

      Feeding game source to LLM

    3. 0

      Target Information System

    4. 2

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 2

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.