: error 035: argument type mismatch (argument 2)
#1

: 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.
Reply
#2

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

Regards.
Reply
#3

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

....
Reply
#5

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

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.
Reply
#7

Thank you for helping.
Reply
#8

Welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)