SA-MP Forums Archive
: error 035: argument type mismatch (argument 2) - 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: : error 035: argument type mismatch (argument 2) (/showthread.php?tid=602332)



: error 035: argument type mismatch (argument 2) - darkhunter332 - 05.03.2016

: error 035: argument type mismatch (argument 2)

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/stats", true))
{
new string[500];
format(string,sizeof(string),"Password: %s | Money: %d | Deaths: %d | Kills: %d | Score: %d | Admin: %d ",PlayerInfo[playerid][pPass],PlayerInfo[playerid][pCash],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid,COL_GREEN,string);
        return 1;
        
    }
    return 0;
Please help me to fix it, rep for helping
Thanks.


Re: : error 035: argument type mismatch (argument 2) - xEF - 05.03.2016

Please don't make double thread, i already answered on other thread.

Regards.


Re: : error 035: argument type mismatch (argument 2) - darkhunter332 - 05.03.2016

Double Thread?
It's completely other script.
Can anyone help me?


Re: : error 035: argument type mismatch (argument 2) - xEF - 05.03.2016

....


Re: : error 035: argument type mismatch (argument 2) - SamJust - 05.03.2016

Which is the line with error? SendClientMessage? If yes, show me your color define.


Re: : error 035: argument type mismatch (argument 2) - MicroKyrr - 06.03.2016

500 string? Really? I think 128 is enough

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/stats"true))
    {
        new 
string[128];
        
format(stringsizeof(string),"Password: %s | Money: %i | Deaths: %i | Kills: %i | Score: %i | Admin: %i"PlayerInfo[playerid][pPass], GetPlayerMoney(playerid), PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pKills], GetPlayerScore(playerid), PlayerInfo[playerid][pAdmin]);
        
SendClientMessage(playeridCOL_GREENstring);
        return 
1;      
    }
    return 
0;

About on Money and Score , you can use GetPlayerMoney and GetPlayerScore.


Re: : error 035: argument type mismatch (argument 2) - darkhunter332 - 07.03.2016

Thank you for helping.


Re: : error 035: argument type mismatch (argument 2) - MicroKyrr - 07.03.2016

Welcome