SA-MP Forums Archive
Need Help - 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: Need Help (/showthread.php?tid=567788)



Need Help - arititlez - 16.03.2015

I want to show score kill In game server this simple

E:\FIN 13-03-58\gamemodes\FIN.pwn(12025) : error 035: argument type mismatch (argument 1)


PHP код:
    if(strcmp(cmd, "/top5", true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
               new 
query[MAX_STRING];
            
format(query, MAX_STRING, "UPDATE players SET ");
            
mysql_tquery(query, "SELECT `Name`,`PointKill` FROM `player` ORDER BY `PointKill` LIMIT 5 >= 1", "OnAdminsFound_", "i", playerid); <<<< (12025) : error 035: argument type mismatch (argument 1)
        }
        return 
1;
    } 
Код HTML:
forward OnAdminsFound_(playerid);
public OnAdminsFound_(playerid)
{
      new name[MAX_PLAYER_NAME+1], rank, string[145];
      for(new i = 0; i < cache_num_rows(); i++)
      {
            cache_get_row(0, 0, name);
            rank = cache_get_row_int(0, 1);
            format(string, sizeof(string), "name : %s | TopKill : %d", name, rank);
            SendClientMessage(playerid, -1, string);
      }
      return 1;
}



Re: Need Help - ATGOggy - 16.03.2015

Try this:
PHP код:
    if(strcmp(cmd, "/top5", true) == 0) 
    { 
        if(
IsPlayerConnected(playerid)) 
        { 
               new 
query; 
            
format(query, MAX_STRING, "UPDATE players SET "); 
            
mysql_tquery(query, "SELECT `Name`,`PointKill` FROM `player` ORDER BY `PointKill` LIMIT 5 >= 1", "OnAdminsFound_", "i", playerid); <<<< (12025) : error 035: argument type mismatch (argument 1) 
        } 
        return 
1; 
    }