MySQL: Server says account exists when it does not
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Threaded queries cannot immediately be retrieved after you've sent them. That's the whole point of threads. The MySQL server will call your specified Pawn function (OnQueryFinish) as soon as it's done executing.
thanks I fixed that but now I am having problems with the stock to save the user data, here it is:
pawn Код:
stock SavePlayerStats(playerid)
{
        new squery[1000], username[MAX_PLAYER_NAME];
        GetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
        PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
        GetPlayerName(playerid, username, sizeof(username));
        format(squery, sizeof(squery), "UPDATE Users SET Sex = %d,Age = %d, Origin = %d, Warns = %d, Money = %d, Level = %d, VIP = %d, Admin = %d, Tester = %d, Kills = %d, Deaths = %d, Muted = %d, Jailed = %d, Banned = %d, X = %f, Y = %f, Z = %f, Job = %d, Faction = %d, Rank = %d, WHERE username='%s'", PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pOrigin], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pTester], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pMuted], PlayerInfo[playerid][pJailed], PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pJob], PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pRank], username);
        mysql_function_query(dbconnect, squery, false, "OnQueryFinish", "");
        mysql_free_result();
}
I forgot to add the errors -.-
Код:
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(366) : error 075: input line too long (after substitutions)
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(367) : error 017: undefined symbol "P"
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : warning 217: loose indentation
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : error 017: undefined symbol "layerInfo"
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : warning 215: expression has no effect
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : error 001: expected token: ";", but found "]"
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : error 029: invalid expression, assumed zero
Y:\Documents\SpectralRP\gamemodes\spectral.pwn(368) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)