12.08.2011, 21:55
Nothing is loading, it all matches perfectly in the SQL.. I can't figure it out.
pawn Код:
stock LoadAccount(playerid)
{
new Name[24],
string[259];
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "SELECT * FROM `accounts` WHERE `username` = '%s'", Name);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_row_format(string, "|");
sscanf(string, "p<|>is[24]s[129]s[16]iiiiifffiiiiii", PlayerInfo[playerid]);
printf(string);
}
return 1;
}
pawn Код:
enum pInfo
{
pSQLid,
pUsername[24],
pPassword[129],
pIP[16],
pAge,
pSex,
pMoney,
pBank,
pSkin,
Float:pPos_x,
Float:pPos_y,
Float:pPos_z,
pTutorial,
pLevel,
pAdmin,
pMuted,
pFaction,
pFactionRank
}
new PlayerInfo[MAX_PLAYERS][pInfo];