SA-MP Forums Archive
[Ajuda] Ajuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda (/showthread.php?tid=498647)



Ajuda - AssasinoLM - 04.03.2014

alguem me diz oque fazer?

Код:
(6989) : warning 202: number of arguments does not match definition
Код:
if(strcmp(cmd,"/a",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
strmid(tmp,cmdtext,2,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,admcmd, "Digite: /a [texto]");
return 1;
} else {
format(string, sizeof(string), "[Admin] %s diz: %s ", aname, tmp);
SendClientMessageToAll(azul);
return 1;
}
}else{
SendClientMessage(playerid,Vermelho,"{0099FF}[x]{CCCCFF} Vocк nгo tem acesso a esse comando!");
return 1;
}
}
a linha do erro seria a:

SendClientMessageToAll(azul);


Re: Ajuda - drop - 04.03.2014

Quote:
Originally Posted by AssasinoLM
Посмотреть сообщение
alguem me diz oque fazer?

Код:
(6989) : warning 202: number of arguments does not match definition
Код:
if(strcmp(cmd,"/a",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
strmid(tmp,cmdtext,2,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,admcmd, "Digite: /a [texto]");
return 1;
} else {
format(string, sizeof(string), "[Admin] %s diz: %s ", aname, tmp);
SendClientMessageToAll(azul);
return 1;
}
}else{
SendClientMessage(playerid,Vermelho,"{0099FF}[x]{CCCCFF} Vocк nгo tem acesso a esse comando!");
return 1;
}
}
a linha do erro seria a:

SendClientMessageToAll(azul);
Tenta Assim...

SendClientMessageToAll(azul ,string);


Re: Ajuda - yNexus - 04.03.2014

PHP код:
if(strcmp(cmd,"/a",true)==0)
{
    new 
aname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridanameMAX_PLAYER_NAME);
    
format(filesizeof(file), P_CONTASaname);
    if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == 5)
    {
        new 
tmp[256];
        
strmid(tmp,cmdtext,2,strlen(cmdtext));
        if(!
strlen(tmp))
        {
            
SendClientMessage(playerid,admcmd"Digite: /a [texto]");
            return 
1;
        }
         else
        {
            
format(stringsizeof(string), "[Admin] %s diz: %s "anametmp);
            
SendClientMessageToAll(azulstring);
            return 
1;
        }
    }
    else
    {
        
SendClientMessage(playerid,Vermelho,"{0099FF}[x]{CCCCFF} Vocк nгo tem acesso a esse comando!");
        return 
1;
    }




AW: Ajuda - AdrianDias - 06.03.2014

Posso ajudar ?

pawn Код:
if(strcmp(cmd,"/a",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
//new msg[256];
strmid(tmp,cmdtext,2,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,Vermelho, "Digite: /a [texto]");
return 1;
} else {
format(string, sizeof(string), "* Administrador(a) %s: %s", aname, tmp);
SendClientMessageToAll(AdminCor,string);
return 1;
}
}else{
SendClientMessage(playerid,Vermelho,"| ERRO | Vocк nгo tem permissгo!");
return 1;
}
}