05.04.2014, 10:06
Okay so I got this code>
I get some errors
How do I fix?
pawn Код:
CMD:top(playerid, params[])
{
new playerData[512], clanname[MAX_PLAYER_NAME], string[512], clankills;
mysql_query(MysqlCon,"SELECT `user`, `Score` FROM `players` ORDER BY `Score`");
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_row(playerData);
sscanf(playerData, "p<|>s[512]d", clanname, clankills);
format(string, sizeof(string), "%s\n"RED"Clan: %s"BLUE"Kills: %d", string, clanname, clankills);
//SendClientMessage(playerid, ~1, string);
ShowPlayerDialog( playerid, 1, DIALOG_STYLE_MSGBOX,"Location: Top Clans", string, "(Close)", "");
}
mysql_free_result();
return 1;
}
Код:
C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3501) : error 017: undefined symbol "mysql_store_result" C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3502) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3504) : error 017: undefined symbol "mysql_fetch_row" C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3511) : error 017: undefined symbol "mysql_free_result"