SA-MP Forums Archive
Problem In Loading Table is MySql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem In Loading Table is MySql (/showthread.php?tid=452788)



Problem In Loading Table is MySql - rouzbeh - 22.07.2013

in this code step 0 completly loaded but step 1 not load
pawn Код:
forward OnPlayerLogin(playerid,password[]);
public OnPlayerLogin(playerid,password[])
{
new string[128];
    format(string, sizeof(string), "SELECT * FROM users WHERE pName = '%s' AND pKey = '%s'", PlayerInfo[playerid][pName], password);
    mysql_query(string);
    mysql_store_result();

    if(!mysql_num_rows())
        { SCM(playerid,COLOR_RED,"Password is wrong.");
        return 1; }
gPlayerLogged[playerid] = 1;
        SCM(playerid,COLOR_ALI,"Login step 0");
    new row[20000];
    new field[121][201];
    mysql_fetch_row_format(row, "|");
    explode(row, field, "|");
    mysql_free_result();
    SCM(playerid,COLOR_ALI,"Login step 1");
    format(PlayerInfo[playerid][pKey], 128, "%s", field[1]);
    PlayerInfo[playerid][pLevel] = strval(field[2]);
    PlayerInfo[playerid][pAdmin] = strval(field[3]);
    PlayerInfo[playerid][pPremiumAccount] = strval(field[4]);
    PlayerInfo[playerid][pConnectTime] = strval(field[5]);
    PlayerInfo[playerid][pAFKtime] = strval(field[6]);
    PlayerInfo[playerid][pReg] = strval(field[7]);
    format(PlayerInfo[playerid][pRegistredDate], 24, "%s", field[8]);
    format(PlayerInfo[playerid][pLastLogin], 64, "%s", field[9]);
    PlayerInfo[playerid][pSex] = strval(field[10]);
    PlayerInfo[playerid][pRented] = strval(field[11]);
    PlayerInfo[playerid][pMuted] = strval(field[12]);
    PlayerInfo[playerid][pMuteTime] = strval(field[13]);
    PlayerInfo[playerid][pExp] = strval(field[14]);
    PlayerInfo[playerid][pCash] = strval(field[15]);
    PlayerInfo[playerid][pAccount] = strval(field[16]);
    PlayerInfo[playerid][pCrimes] = strval(field[17]);
    PlayerInfo[playerid][pKills] = strval(field[18]);
    PlayerInfo[playerid][pDeaths] = strval(field[19]);
    PlayerInfo[playerid][pArrested] = strval(field[20]);
    PlayerInfo[playerid][pWantedDeaths] = strval(field[21]);
    PlayerInfo[playerid][pPhoneBook] = strval(field[22]);
    PlayerInfo[playerid][pLottoNr] = strval(field[23]);
    PlayerInfo[playerid][pFishes] = strval(field[24]);
    PlayerInfo[playerid][pJob] = strval(field[25]);
    PlayerInfo[playerid][pPayCheck] = strval(field[26]);
    PlayerInfo[playerid][pHeadValue] = strval(field[27]);
    PlayerInfo[playerid][pJailed] = strval(field[28]);
    PlayerInfo[playerid][pJailTime] = strval(field[29]);
    PlayerInfo[playerid][pMats] = strval(field[30]);
    PlayerInfo[playerid][pDrugs] = strval(field[31]);
    PlayerInfo[playerid][pLeader] = strval(field[32]);
    PlayerInfo[playerid][pTow] = strval(field[33]);
    PlayerInfo[playerid][pMember] = strval(field[34]);
    PlayerInfo[playerid][pPunish] = strval(field[35]);
    PlayerInfo[playerid][pFwarn] = strval(field[36]);
    PlayerInfo[playerid][pRank] = strval(field[37]);
    PlayerInfo[playerid][cSkin] = strval(field[38]);
    PlayerInfo[playerid][fSkin] = strval(field[39]);
    PlayerInfo[playerid][pContractTime] = strval(field[40]);
    PlayerInfo[playerid][pDetSkill] = strval(field[41]);
    PlayerInfo[playerid][pLawSkill] = strval(field[42]);
    PlayerInfo[playerid][pMechSkill] = strval(field[43]);
    PlayerInfo[playerid][pJackSkill] = strval(field[44]);
    PlayerInfo[playerid][pNewsSkill] = strval(field[45]);
    PlayerInfo[playerid][pDrugsSkill] = strval(field[46]);
    PlayerInfo[playerid][pMatsSkill] = strval(field[47]);
    PlayerInfo[playerid][pTeam] = strval(field[48]);
    PlayerInfo[playerid][pPnumber] = strval(field[49]);
    PlayerInfo[playerid][pPhousekey] = strval(field[50]);
    PlayerInfo[playerid][pCar] = strval(field[51]);
    PlayerInfo[playerid][pRob] = strval(field[52]);
    PlayerInfo[playerid][pRobSkill] = strval(field[53]);
    PlayerInfo[playerid][pPbiskey] = strval(field[54]);
    PlayerInfo[playerid][pCarLic] = strval(field[55]);
    PlayerInfo[playerid][pFlyLic] = strval(field[56]);
    PlayerInfo[playerid][pBoatLic] = strval(field[57]);
    PlayerInfo[playerid][pFishLic] = strval(field[58]);
    PlayerInfo[playerid][pGunLic] = strval(field[59]);
    PlayerInfo[playerid][pMatsLic] = strval(field[60]);
    PlayerInfo[playerid][pCarLicS] = strval(field[61]);
    PlayerInfo[playerid][pFlyLicS] = strval(field[62]);
    PlayerInfo[playerid][pBoatLicS] = strval(field[63]);
    PlayerInfo[playerid][pGunLicS] = strval(field[64]);
    PlayerInfo[playerid][pMatsLicS] = strval(field[65]);
    PlayerInfo[playerid][pCarTime] = strval(field[66]);
    PlayerInfo[playerid][pPayDayHad] = strval(field[67]);
    PlayerInfo[playerid][pTut] = strval(field[68]);
    PlayerInfo[playerid][pWarns] = strval(field[69]);
    PlayerInfo[playerid][pCanistra] = strval(field[70]);
    PlayerInfo[playerid][pMarried] = strval(field[71]);
    format(PlayerInfo[playerid][pMarriedTo],128,"%s",field[72]);
    PlayerInfo[playerid][pLighter] = strval(field[73]);
    PlayerInfo[playerid][pCigarettes] = strval(field[74]);
    PlayerInfo[playerid][pRoadblock] = strval(field[75]);
    PlayerInfo[playerid][pLocked] = strval(field[76]);
    PINFO[playerid][pLanguage] = strval(field[77]);
    PINFO[playerid][pLawyerPoint] = strval(field[78]);
    PINFO[playerid][pApproval] = strval(field[79]);
    PlayerInfo[playerid][pWanted] = strval(field[80]);
 PlayerInfo[playerid][cIDcar] = strval(field[81]);
PlayerInfo[playerid][cLocationx] = floatstr(field[82]);
PlayerInfo[playerid][cLocationy] = floatstr(field[83]);
PlayerInfo[playerid][cLocationz] = floatstr(field[84]);
PlayerInfo[playerid][cAngle] = floatstr(field[85]);
PlayerInfo[playerid][cColor1] = strval(field[86]);
PlayerInfo[playerid][cColor2] = strval(field[87]);
format(PlayerInfo[playerid][cOwner],128,"%s",field[88]);
PlayerInfo[playerid][cModel] = strval(field[89]);
PlayerInfo[playerid][cPrice] = strval(field[90]);
format(PlayerInfo[playerid][cPlate],128,"%s",field[91]);
PlayerInfo[playerid][cLock] = strval(field[92]);
PlayerInfo[playerid][cDestroyed] = strval(field[93]);
PlayerInfo[playerid][cFuel] = strval(field[94]);
PlayerInfo[playerid][cHealth] = floatstr(field[95]);
PlayerInfo[playerid][cMod1] = strval(field[96]);
PlayerInfo[playerid][cMod2] = strval(field[97]);
PlayerInfo[playerid][cMod3] = strval(field[98]);
PlayerInfo[playerid][cMod4] = strval(field[99]);
PlayerInfo[playerid][cMod5] = strval(field[100]);
PlayerInfo[playerid][cMod6] = strval(field[101]);
PlayerInfo[playerid][cMod7] = strval(field[102]);
PlayerInfo[playerid][cMod8] = strval(field[103]);
PlayerInfo[playerid][cMod9] = strval(field[104]);
PlayerInfo[playerid][cMod10] = strval(field[105]);
PlayerInfo[playerid][cMod11] = strval(field[106]);
PlayerInfo[playerid][cMod12] = strval(field[107]);
PlayerInfo[playerid][cMod13] = strval(field[108]);
PlayerInfo[playerid][cMod14] = strval(field[109]);
PlayerInfo[playerid][cMod15] = strval(field[110]);
PlayerInfo[playerid][cMod16] = strval(field[111]);
PlayerInfo[playerid][cMod17] = strval(field[112]);
PlayerInfo[playerid][cPaintJob] = strval(field[113]);
PlayerInfo[playerid][cKilo] = floatstr(field[114]);
PlayerInfo[playerid][cPanel] = strval(field[115]);
PlayerInfo[playerid][cDoors] = strval(field[116]);
PlayerInfo[playerid][cLights] = strval(field[117]);
PlayerInfo[playerid][cTires] = strval(field[118]);
PlayerInfo[playerid][cFixed] = strval(field[119]);
format(PlayerInfo[playerid][pEmail],200,"%s",field[120]);
return 1;
}
whats the problem in code?
I'm using BlueG's Mysql plugin R6


Re: Problem In Loading Table is MySql - Macluawn - 22.07.2013

What does the log say?