Help [LoadRank or Top in Mysql]
#1

I Try This

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(sqlsizeof(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(pNamestrtok(sqltemp,idx,'|'));
           
Kills strval(strtok(sqltemp,idx,'|'));
           
format(stringsizeof(string), "%d|%s|%d",rank,pName,Kills);
           
SendClientMessage(playerid,COLOR_RED,string);
           
rank++;
      }
      return 
1;

But this error.

PHP код:
(35290) : warning 202number of arguments does not match definition (Line strcat(pNamestrtok(sqltemp,idx,'|'));
(
35291) : warning 202number of arguments does not match definition (Line Kills strval(strtok(sqltemp,idx,'|')); 
Not Work.
Reply
#2

I Try But i can't Understood idx.
Reply
#3

Please help in this field .
Reply
#4

I Testing for this command not complete
Reply
#5

I Need help this command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)