SA-MP Forums Archive
warning 202: number of arguments does not match definition - 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: warning 202: number of arguments does not match definition (/showthread.php?tid=322415)



warning 202: number of arguments does not match definition - rati555 - 02.03.2012

I'm using this include
[Include]My Mailer Include
Usage
PHP код:
SendMailto[], sender_email[], sender_name[], subject[], message[] ); 
pawn Код:
case DIALOG_EMAIL:
{
 if (!response) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_WHITE"Email",""COL_GREEN"Type Your Email Here","Ok","");
 if(response)
 {
   new string[256];
   PlayerInfo[playerid][pMail] = strlen(inputtext);
    format(string,sizeof(string),"%s","test@mail.ru", "Administration", "Registration Finished"," .... ",PlayerInfo[playerid][pMail]);
   SendMail(string); // 1269
   SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
   SpawnPlayer(playerid);
   PLAYERLOGGED[playerid] = 1;
   }
   return 1;
   }
it gives me this warning
Код:
test.pwn(1269) : warning 202: number of arguments does not match definition



Re: warning 202: number of arguments does not match definition - Hurde - 02.03.2012

can u add the lines numbers? ow wait i think i see the prob
Fix try to remove the _ spaces


Re: warning 202: number of arguments does not match definition - TopFuel - 02.03.2012

try this:
pawn Код:
case DIALOG_EMAIL:
{
    if (!response) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_WHITE"Email",""COL_GREEN"Type Your Email Here","Ok","");
    if(response)
    {
        new string[256];
        PlayerInfo[playerid][pMail] = strlen(inputtext);
        format(string,sizeof(string),"%s",PlayerInfo[playerid][pMail]);
        SendMail(string,"test@mail.ru", "Administration", "Registration Finished"," .... "); // 1269
        SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
        SpawnPlayer(playerid);
        PLAYERLOGGED[playerid] = 1;
    }
    return 1;
}
PS: Not tested


Re: warning 202: number of arguments does not match definition - rati555 - 02.03.2012

Quote:
Originally Posted by Top Fuel
Посмотреть сообщение
try this:
pawn Код:
case DIALOG_EMAIL:
{
    if (!response) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_WHITE"Email",""COL_GREEN"Type Your Email Here","Ok","");
    if(response)
    {
        new string[256];
        PlayerInfo[playerid][pMail] = strlen(inputtext);
        format(string,sizeof(string),"%s",PlayerInfo[playerid][pMail]);
        SendMail(string,"test@mail.ru", "Administration", "Registration Finished"," .... "); // 1269
        SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
        SpawnPlayer(playerid);
        PLAYERLOGGED[playerid] = 1;
    }
    return 1;
}
PS: Not tested
it worked thanks rep+


Re: warning 202: number of arguments does not match definition - TopFuel - 02.03.2012

Quote:
Originally Posted by rati555
Посмотреть сообщение
it worked thanks rep+
I made some improvements in the code:
pawn Код:
case DIALOG_EMAIL:
{
    if (!response) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_WHITE"Email",""COL_GREEN"Type Your Email Here","Ok","");
    if(response)
    {
        PlayerInfo[playerid][pMail] = inputtext;
        SendMail(PlayerInfo[playerid][pMail],"test@mail.ru", "Administration", "Registration Finished"," .... ");
        SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
        SpawnPlayer(playerid);
        PLAYERLOGGED[playerid] = 1;
    }
    return 1;
}
PS: Not tested І