Command out of sync [MySQL]
#1

EDIT:

Still recieving this everytime I relog.

Код:
[17:32:33] errorid: 2014 | error: Commands out of sync; you can't run this command now | resultid: -1 | extraid: -1 | callback: NULL | query: UPDATE playeraccounts SET playerBanned = '0', playerSeconds = '798', playerSkin = '10', playerMoney = '37300', playerBankMoney = '20000', playerInterior = '0', playerVirtualWorld = '0', playerHealth = '100.000000', playerArmour = '0.000000', playerPosX = '1458.080078', playerPosY = '-1337.687500', playerPosZ = '13.382812', playerAccent = 'American', playerAdminLevel = '6', playerJob = '0', playerWeapon0 = '0', playerWeapon1 = '0', playerWeapon2 = '0', playerWeapon3 = '0', playerWeapon4 = '0', playerWeapon5 = '0', playerWeapon6 = '0', playerWeapon7 = '0', playerWeapon8 = '0', playerWeapon9 = '0', playerWeapon10 = '0', playerWeapon11 = '0', playerWeapon12 = '0', playerJobSkill1 = '0', playerJobSkill2 = '0', playerMaterials = '0', playerHours = '0', playerLevel = '0', playerWarning1 = '(null)', playerWarning2 = '(null)', playerWarning3 = '(null)', playerHospitalized = '0', playerFirstLogin = '0', playerAdminName = '(null)', playerPrisonTime = '0', playerPrisonID = '0', playerPhoneNumber = '-1', playerStatus = '1', playerGender = '1', playerFightStyle = '0', playerPhoneCredit = '0', playerWalkieTalkie = '-1', playerCarKey1 = '199', playerCarKey2 = '-1', playerCarKey3 = '-1', playerPhoneBook = '0', playerGroup = '0', playerGroupRank = '0', playerIP = '213.81.84.26', playerDropCarTimeout = '0', playerRope = '0', playerAdminDuty = '0', playerCrimes = '0', playerArrests = '0', playerWarrants = '0', playerAge = '1978', playerAdminPIN = '6666' WHERE playerID = '1'
pawn Код:
stock savePlayerData(const playerid) {
    if(playerVariables[playerid][pStatus] >= 1 || playerVariables[playerid][pStatus] == -1) {
        new
            saveQuery[3500];

        if(playerVariables[playerid][pStatus] == -1) playerVariables[playerid][pStatus] = 0;
        /*if(playerVariables[playerid][pCarModel] >= 1 && doesVehicleExist(playerVariables[playerid][pCarID])) {
            GetVehiclePos(playerVariables[playerid][pCarID], playerVariables[playerid][pCarPos][0], playerVariables[playerid][pCarPos][1], playerVariables[playerid][pCarPos][2]);
            GetVehicleZAngle(playerVariables[playerid][pCarID], playerVariables[playerid][pCarPos][3]);

            for(new i = 0; i < 13; i++) {
                playerVariables[playerid][pCarMods][i] = GetVehicleComponentInSlot(playerVariables[playerid][pCarID], i);
            }
        }*/


        if(playerVariables[playerid][pAdminDuty] == 0 && playerVariables[playerid][pEvent] == 0) {
            GetPlayerHealth(playerid, playerVariables[playerid][pHealth]);
            GetPlayerArmour(playerid, playerVariables[playerid][pArmour]);
        }

        // If they're not in an event and not spectating, current pos is saved. Otherwise, they'll be set back to the pos they last used /joinevent or /spec.
        if(playerVariables[playerid][pSpectating] == INVALID_PLAYER_ID && playerVariables[playerid][pEvent] == 0) {
            GetPlayerPos(playerid, playerVariables[playerid][pPos][0], playerVariables[playerid][pPos][1], playerVariables[playerid][pPos][2]);
            playerVariables[playerid][pInterior] = GetPlayerInterior(playerid);
            playerVariables[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid); // If someone disconnects while spectating.
        }

        format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerBanned = '%d', playerSeconds = '%d', playerSkin = '%d', playerMoney = '%d', playerBankMoney = '%d'", playerVariables[playerid][pBanned], playerVariables[playerid][pSeconds], playerVariables[playerid][pSkin], playerVariables[playerid][pMoney], playerVariables[playerid][pBankMoney]);

        format(saveQuery, sizeof(saveQuery), "%s, playerInterior = '%d', playerVirtualWorld = '%d', playerHealth = '%f', playerArmour = '%f', playerPosX = '%f', playerPosY = '%f', playerPosZ = '%f'", saveQuery, playerVariables[playerid][pInterior], playerVariables[playerid][pVirtualWorld], playerVariables[playerid][pHealth], playerVariables[playerid][pArmour], playerVariables[playerid][pPos][0], playerVariables[playerid][pPos][1], playerVariables[playerid][pPos][2]);

        format(saveQuery, sizeof(saveQuery), "%s, playerAccent = '%s', playerAdminLevel = '%d', playerJob = '%d', playerWeapon0 = '%d', playerWeapon1 = '%d', playerWeapon2 = '%d', playerWeapon3 = '%d'", saveQuery, playerVariables[playerid][pAccent], playerVariables[playerid][pAdminLevel], playerVariables[playerid][pJob], playerVariables[playerid][pWeapons][0], playerVariables[playerid][pWeapons][1], playerVariables[playerid][pWeapons][2], playerVariables[playerid][pWeapons][3]);

        format(saveQuery, sizeof(saveQuery), "%s, playerWeapon4 = '%d', playerWeapon5 = '%d', playerWeapon6 = '%d', playerWeapon7 = '%d', playerWeapon8 = '%d', playerWeapon9 = '%d', playerWeapon10 = '%d'", saveQuery, playerVariables[playerid][pWeapons][4], playerVariables[playerid][pWeapons][5], playerVariables[playerid][pWeapons][6], playerVariables[playerid][pWeapons][7], playerVariables[playerid][pWeapons][8], playerVariables[playerid][pWeapons][9], playerVariables[playerid][pWeapons][10]);

        format(saveQuery, sizeof(saveQuery), "%s, playerWeapon11 = '%d', playerWeapon12 = '%d', playerJobSkill1 = '%d', playerJobSkill2 = '%d', playerMaterials = '%d', playerHours = '%d', playerLevel = '%d'", saveQuery, playerVariables[playerid][pWeapons][11], playerVariables[playerid][pWeapons][12], playerVariables[playerid][pJobSkill][0], playerVariables[playerid][pJobSkill][1], playerVariables[playerid][pMaterials], playerVariables[playerid][pPlayingHours], playerVariables[playerid][pLevel]);

        format(saveQuery, sizeof(saveQuery), "%s, playerWarning1 = '%s', playerWarning2 = '%s', playerWarning3 = '%s', playerHospitalized = '%d', playerFirstLogin = '%d', playerAdminName = '%s', playerPrisonTime = '%d', playerPrisonID = '%d', playerPhoneNumber = '%d'", saveQuery, playerVariables[playerid][pWarning1], playerVariables[playerid][pWarning2], playerVariables[playerid][pWarning3], playerVariables[playerid][pHospitalized], playerVariables[playerid][pFirstLogin], playerVariables[playerid][pAdminName],
        playerVariables[playerid][pPrisonTime], playerVariables[playerid][pPrisonID], playerVariables[playerid][pPhoneNumber]);

        format(saveQuery, sizeof(saveQuery), "%s, playerStatus = '%d', playerGender = '%d', playerFightStyle = '%d', playerPhoneCredit = '%d', playerWalkieTalkie = '%d', playerCarKey1 = '%d', playerCarKey2 = '%d', playerCarKey3 = '%d'", saveQuery, playerVariables[playerid][pStatus], playerVariables[playerid][pGender], playerVariables[playerid][pFightStyle], playerVariables[playerid][pPhoneCredit],
        playerVariables[playerid][pWalkieTalkie], playerVariables[playerid][pCarKey1], playerVariables[playerid][pCarKey2], playerVariables[playerid][pCarKey3]);

        format(saveQuery, sizeof(saveQuery), "%s, playerPhoneBook = '%d', playerGroup = '%d', playerGroupRank = '%d', playerIP = '%s', playerDropCarTimeout = '%d', playerRope = '%d', playerAdminDuty = '%d', playerCrimes = '%d', playerArrests = '%d', playerWarrants = '%d', playerAge = '%d'", saveQuery, playerVariables[playerid][pPhoneBook],
        playerVariables[playerid][pGroup], playerVariables[playerid][pGroupRank], playerVariables[playerid][pConnectionIP], playerVariables[playerid][pDropCarTimeout], playerVariables[playerid][pRope], playerVariables[playerid][pAdminDuty], playerVariables[playerid][pCrimes], playerVariables[playerid][pArrests], playerVariables[playerid][pWarrants], playerVariables[playerid][pAge]);

        if(playerVariables[playerid][pHelper] > 0)
            format(saveQuery, sizeof(saveQuery), "%s, playerHelperLevel = '%d'", saveQuery, playerVariables[playerid][pHelper]);
           
        if(playerVariables[playerid][pAdminLevel] > 0)
            format(saveQuery, sizeof(saveQuery), "%s, playerAdminPIN = '%d'", saveQuery, GetPVarInt(playerid, "pAdminPIN"));
           
        format(saveQuery, sizeof(saveQuery), "%s WHERE playerID = '%d'", saveQuery, playerVariables[playerid][pInternalID]);
        mysql_query(saveQuery);
        mysql_store_result();
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
Command out of sync [MySQL] - by Boooth - 13.09.2012, 12:52
Re: Command out of sync [MySQL] - by Boooth - 13.09.2012, 14:30
Re: Command out of sync [MySQL] - by SuperViper - 13.09.2012, 14:38
Re: Command out of sync [MySQL] - by Ricop522 - 13.09.2012, 14:54
Re: Command out of sync [MySQL] - by Boooth - 13.09.2012, 15:08
Re: Command out of sync [MySQL] - by Boooth - 13.09.2012, 17:21
Re: Command out of sync [MySQL] - by Boooth - 13.09.2012, 20:06

Forum Jump:


Users browsing this thread: 2 Guest(s)