29.03.2015, 20:46
I Try This
But this error.
Not Work.
PHP код:
forward LoadRank(playerid);
public LoadRank(playerid)
{
new rank = 1;
new idx;
new string[256];
new sql[64],sqltemp[256];
new pName[MAX_PLAYER_NAME];
new Kills;
format(sql, sizeof(sql), "SELECT Name,PointKill FROM players ORDER BY PointKill DESC LIMIT 10");
samp_mysql_query(sql);
samp_mysql_store_result();
while(samp_mysql_fetch_row(sqltemp))
{
idx = 0;
pName[0] = '\0';
strcat(pName, strtok(sqltemp,idx,'|'));
Kills = strval(strtok(sqltemp,idx,'|'));
format(string, sizeof(string), "%d|%s|%d",rank,pName,Kills);
SendClientMessage(playerid,COLOR_RED,string);
rank++;
}
return 1;
}
PHP код:
(35290) : warning 202: number of arguments does not match definition (Line = strcat(pName, strtok(sqltemp,idx,'|'));
(35291) : warning 202: number of arguments does not match definition (Line = Kills = strval(strtok(sqltemp,idx,'|'));