SA-MP Forums Archive
[Ajuda] Esses erros e avisos - 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] Esses erros e avisos (/showthread.php?tid=658801)



Esses erros e avisos - Saik - 12.09.2018

Код:
C:\Users\Marcenaria Alves\Desktop\a\Crear Server DavitMT\GM Family Triads\GM Family Triads\gamemodes\futurerp.pwn(258) : warning 202: number of arguments does not match definition
C:\Users\Marcenaria Alves\Desktop\a\Crear Server DavitMT\GM Family Triads\GM Family Triads\gamemodes\futurerp.pwn(258) : warning 202: number of arguments does not match definition
C:\Users\Marcenaria Alves\Desktop\a\Crear Server DavitMT\GM Family Triads\GM Family Triads\gamemodes\futurerp.pwn(258) : error 035: argument type mismatch (argument 3)
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
            case 
655:
        {
            if(
response)
            {
                if(!
strlen(inputtext))
                {
                    
ShowPlayerDialog(playerid,655,DIALOG_STYLE_INPUT,"{00FFAA}Reportar um bug","Faзa uma breve descriзгo do problema.\nExemplo:{00CC00}Jogador quando morre nгo renasce!","Reportar","Sair");
                }
                else
                {
                    new 
arq[20];
                    
format(arq,sizeof(arq),"reportbugnumber.ini");
                    
DOF2_SetInt(arq,"Numero",DOF2_GetInt(arq,"Numero") + 1);
                    new 
novoarq[64];
                    
format(novoarq,sizeof(novoarq),"report%d.ini",DOF2_GetInt(arq,"Numero"));
                    
DOF2_CreateFile(novoarq,"a");
                    
DOF2_SetString(novoarq,"Conteudo",inputtext);
                    
DOF2_SetString(novoarq,"Remetente",GetPlayerName(playerid)); //esta linha 
                    
new string[128];
                    
format(string,sizeof(string),"Obrigado pelo seu report, a staff agradece!",DOF2_GetInt(arq,"Numero"));
                    
SCM(playerid,cor_amarelo,string);
                }
            }
        }
    return 
1;

Me desculpe qualquer idiotice que eu tenha feito, ainda estou aprendendo


Re: Esses erros e avisos - FerrariL - 12.09.2018

Aponte a linha do erro.


Re: Esses erros e avisos - Saik - 12.09.2018

Quote:
Originally Posted by FerrariL
Посмотреть сообщение
Aponte a linha do erro.
esta como comentбrio no cуdigo, й a linha do "remetente"


Re: Esses erros e avisos - FerrariL - 12.09.2018

Quote:
Originally Posted by Saik
Посмотреть сообщение
esta como comentбrio no cуdigo, й a linha do "remetente"
pawn Код:
DOF2_SetString(novoarq,"Conteudo");
DOF2_SetString(novoarq,"Remetente");
Esta funзгo nгo aceita 3 argumentos.


Re: Esses erros e avisos - Luiiiz - 12.09.2018

Quote:
Originally Posted by FerrariL
Посмотреть сообщение
pawn Код:
DOF2_SetString(novoarq,"Conteudo");
DOF2_SetString(novoarq,"Remetente");
Esta funзгo nгo aceita 3 argumentos.
Уbvio que aceita.
PHP код:
DOF2_SetString(file"local""string"); 
O erro й que vocк estб usando o GetPlayerName de modo incorreto.
Modo correto:
PHP код:
new pname[MAX_PLAYER_NAME];
GetPlayerName(playeridpnameMAX_PLAYER_NAME); 



Re: Esses erros e avisos - FerrariL - 12.09.2018

Quote:
Originally Posted by Luiiiz
Посмотреть сообщение
Уbvio que aceita.
Valeu por me lembrar

Complementado a resposta dele.
pawn Код:
DOF2_SetString(novoarq,"Remetente",pname);