Need Help on sscanf2 to onplayerlogin
#1

playerinfo

pawn Код:
enum pInfo
{
    pSQLID,
    pKey[128],
    pLevel,
    pAdmin,
    pDonateRank,
    gPupgrade,
    pConnectTime,
    pReg,
    pSex,
    pAge,
    pOrigin,
    pCK,
    pMuted,
    pExp,
    pCash,
    pAccount,
    pCrimes,
    pKills,
    pDeaths,
    pArrested,
    pWantedDeaths,
    pPhoneBook,
    pLottoNr,
    pFishes,
    pBiggestFish,
    pJob,
    pPayCheck,
    pHeadValue,
    pJailed,
    pJailTime,
    pMats,
    pDrugs,
    pLeader,
    pMember,
    pRank,
    pCharacter,
    pContractTime,
    pDetSkill,
    pSexSkill,
    pBoxSkill,
    pLawSkill,
    pMechSkill,
    pJackSkill,
    pCarSkill,
    pNewsSkill,
    pDrugsSkill,
    pCookSkill,
    pFishSkill,
    Float:pHealth,
    Float:pSHealth,
    pInt,
    pLocal,
    pTeam,
    pModel,
    pPnumber,
    pPhousekey,
    pPbiskey,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pCarLic,
    pFlyLic,
    pBoatLic,
    pFishLic,
    pGunLic,
    pGun1,
    pGun2,
    pGun3,
    pGun4,
    pAmmo1,
    pAmmo2,
    pAmmo3,
    pAmmo4,
    pCarTime,
    pPayDay,
    pPayDayHad,
    pCDPlayer,
    pWins,
    pLoses,
    pAlcoholPerk,
    pDrugPerk,
    pMiserPerk,
    pPainPerk,
    pTraderPerk,
    pTut,
    pMissionNr,
    pWarns,
    pAdjustable,
    pFuel,
    pMarried,
    pMarriedTo[128],
    pLocked,
    pCardPassword,
    pDate[2],
    pBirthday,
    pDateRegistered[12],
};
new PlayerInfo[MAX_PLAYERS][pInfo];

pawn Код:
if(mysql_fetch_row_format(Query,"|")) // Splits the row
        {
            sscanf(Query, "p<|>e<is[128]iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiiiiiiifffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii>",PlayerInfo[playerid]);
        }
        MySQLUltLog(PlayerInfo[playerid][pSQLID], "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
        mysql_store_result();
my problem: is not work i get random valou i have admin level 6 after relog i have admin level 50 or is have password 123 after login the password is my name
pls help me
Reply
#2

Show my your sql query. I assume you are doing something like SELECT *, so it includes all fields. I can also assume that before your password field there is name field - which causes makes your password to be your nick, and screws up all futher fields by one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)