15.01.2014, 15:02
Well, I have been working on fixing this bug for ages now. So earyler today I decided to change my load method to sscanf. It compiled successfully but unfortunatly - it isn't setting the variables upon login.
To behonest, first time I have used sscanf properly. If someone could help me REP+
pawn Код:
new query[1024], pname[24];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT * FROM `PlayerInfo` WHERE `user` = '%s'", pname);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query, "|"))
{
sscanf(query, "p<|>ddddddsddssssdddddddddddddddddddddddddddddddddddddsssdddddddddd",
PlayerInfo[playerid][bank], //Non-String
PlayerTemp[playerid][sm], //Non-String
PlayerInfo[playerid][playerlvl], //Non-String
PlayerInfo[playerid][rpoints], //Non-String
PlayerInfo[playerid][playertime], //Non-String
PlayerInfo[playerid][jail], //Non-String
PlayerInfo[playerid][jailreason], //String
PlayerInfo[playerid][jailtime], //Non-String
PlayerInfo[playerid][banned], //Non-String
PlayerInfo[playerid][banreason], //String
PlayerInfo[playerid][whobannedme], //String
PlayerInfo[playerid][whenigotbanned], //String
PlayerInfo[playerid][forumname], //String
PlayerInfo[playerid][Skin], //Non-String
PlayerInfo[playerid][ranklvl], //Non-String
PlayerInfo[playerid][rentprice], //Non-String
PlayerInfo[playerid][driverlic], //Non-String
PlayerInfo[playerid][flylic], //Non-String
PlayerInfo[playerid][namechanges], //Non-String
PlayerInfo[playerid][boatlic], //Non-String
PlayerInfo[playerid][weaplic], //Non-String
PlayerInfo[playerid][jobtime], //Non-String
PlayerInfo[playerid][jobskill], //Non-String
PlayerInfo[playerid][pbkills], //Non-String
PlayerInfo[playerid][pbdeaths], //Non-String
PlayerInfo[playerid][totalpayt], //Non-String
PlayerInfo[playerid][housenum], //Non-String
PlayerInfo[playerid][tracker], //Non-String
PlayerInfo[playerid][loan], //Non-String
PlayerInfo[playerid][drugs], //Non-String
PlayerInfo[playerid][guns], //Non-String
PlayerInfo[playerid][sguns], //Non-String
PlayerInfo[playerid][sdrugs], //Non-String
PlayerInfo[playerid][power], //Non-String
PlayerInfo[playerid][female], //Non-String
PlayerInfo[playerid][bail], //Non-String
PlayerInfo[playerid][premium], //Non-String
PlayerInfo[playerid][gotphone], //Non-String
PlayerInfo[playerid][phonenumber], //Non-String
PlayerInfo[playerid][phonebook], //Non-String
PlayerInfo[playerid][laptop], //Non-String
PlayerInfo[playerid][age], //Non-String
PlayerInfo[playerid][premiumexpire], //Non-String
PlayerInfo[playerid][playerteam], //Non-String
PlayerInfo[playerid][radio], //Non-String
PlayerInfo[playerid][freq1], //Non-String
PlayerInfo[playerid][freq2], //Non-String
PlayerInfo[playerid][freq3], //Non-String
PlayerInfo[playerid][tutorial], //Non-String
PlayerInfo[playerid][tbanned], //Non-String
PlayerInfo[playerid][city], //String
PlayerInfo[playerid][PTeamName], //String
PlayerInfo[playerid][job], //String
PlayerInfo[playerid][totalruns], //Non-String
PlayerInfo[playerid][fpay], //Non-String
PlayerInfo[playerid][warns], //Non-String
PlayerInfo[playerid][helper], //Non-String
PlayerInfo[playerid][curfreq], //Non-String
PlayerInfo[playerid][rankname], //Non-String
PlayerInfo[playerid][phonechanges], //Non-String
PlayerInfo[playerid][iPod], //Non-String
PlayerInfo[playerid][finvite], //Non-String
PlayerInfo[playerid][fradio]); //Non-String
}
mysql_free_result();