SA-MP Forums Archive
Different types of SQL Issues - 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: Different types of SQL Issues (/showthread.php?tid=431381)



Different types of SQL Issues - KiNG3 - 17.04.2013

Please delete, it's fixed!!! Thanks to everyone!


AW: Different types of SQL Issues - ulbi1990 - 17.04.2013

You are using the UPDATE wrong, watch this two lines very carefully:

pawn Код:
format(szQuery, sizeof(szQuery), "UPDATE `players` SET `Money` = '%d', `Score` = '%d', `Admin` = '%d', `Kills` = '%d', `Deaths` = '%d', `Weather` = '%d'",PlayerInfo[playerid][pCash], PlayerInfo[playerid][pScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pWeather]);
    format(szQuery, sizeof(szQuery), "%s, Skin = %d, Time = %d, Color = %d, Tele = %d, Message = %d WHERE Username = '%s'", szQuery, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pTime], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pTele], PlayerInfo[playerid][pTele], PlayerInfo[playerid][pMessage], PlayerInfo[playerid][pWeather]);
Better said watch the last line your messing to much with it around. You have two times:
pawn Код:
PlayerInfo[playerid][pTele]
in a row remove one time.
Instead of the Playername does you try to save the weather.
pawn Код:
PlayerInfo[playerid][pWeather]
The last one in the second one should when i watched now correct be:
pawn Код:
PlayerInfo[playerid][pUsername]
//instead of
PlayerInfo[playerid][pWeather]
If you can't fix it urself, shout and i give you the fixed part.


Re: Different types of SQL Issues - KiNG3 - 17.04.2013

I see that, but that still didn't help from saving everything ;(

But thanks for pointing out my clueless mistakes :P


Re: Different types of SQL Issues - KiNG3 - 17.04.2013

I had to fix some other code now it's fixed.. Thanks