SA-MP Forums Archive
Help [LoadRank or Top in Mysql] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help [LoadRank or Top in Mysql] (/showthread.php?tid=569335)



Help [LoadRank or Top in Mysql] - arititlez - 29.03.2015

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.


Re: Help [LoadRank or Top in Mysql] - arititlez - 30.03.2015

I Try But i can't Understood idx.


Re: Help [LoadRank or Top in Mysql] - arititlez - 30.03.2015

Please help in this field .


Re: Help [LoadRank or Top in Mysql] - arititlez - 31.03.2015

I Testing for this command not complete


Re: Help [LoadRank or Top in Mysql] - arititlez - 05.04.2015

I Need help this command