Jump to content
  • 0

problem mainline


Krixius

Question

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

6 answers to this question

Recommended Posts

  • 0

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
  • 0

i dont try nothing, this is the sysser, when i try to delete a character with my personal core.

 

If i use 40k of ymir, i dont have problems for delete a character.

 

So i think i have a bug in the delete character of my source.

 

I use mainline

:D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.