argument type mismatch (argument 1)
#1

Where is the error?
[pwn] tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /email [accountname] [password]");
return 1;
}
new accountname = strval(tmp);
if(strlen(accountname) < 3 || strlen(accountname) > 10) { SendClientMessage(playerid, COLOR_GRAD2, " Your name MUST have 3 words and not ore than 10 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /email [accountname] [password]");
return 1;
}
new accountpass = strval(tmp);
if(strlen(accountpass) < 5 && strlen(accountpass) > 15) { SendClientMessage(playerid, COLOR_GRAD2, " You password MUST have 5 words and not more than 15 !"); return 1; }
PlayerInfo[playerid][pAccountMailName] = accountname;
PlayerInfo[playerid][pAccountMailPass] = accountpass;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have created your E-mail Account.");
format(string, sizeof(string), "Account: %s, Password: %d",PlayerInfo[playerid][pAccountMailName], PlayerInfo[playerid][pAccountMailPass]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;[/pwn]
Reply
#2

And on which line ?
And use
Код:
[pwn]stuff[/pwn]
Reply
#3

This Line

if(strlen(accountname) < 3 || strlen(accountname) > 10) { SendClientMessage(playerid, COLOR_GRAD2, " Your name MUST have 3 words and not ore than 10 !"); return 1; }
Reply
#4

What is the error?

pawn Код:
tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /email [accountname] [password]");
         return 1;
        }
        new accountname = strval(tmp);
        if(strlen(accountname) < 3 || strlen(accountname) > 10) { SendClientMessage(playerid, COLOR_GRAD2, "  Your name MUST have 3 words and not ore than 10 !"); return 1; }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /email [accountname] [password]");
         return 1;
        }
        new accountpass = strval(tmp);
        if(strlen(accountpass) < 5 && strlen(accountpass) > 15) { SendClientMessage(playerid, COLOR_GRAD2, "  You password MUST have 5 words and not more than 15 !"); return 1; }
        PlayerInfo[playerid][pAccountMailName] = accountname;
        PlayerInfo[playerid][pAccountMailPass] = accountpass;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have created your E-mail Account.");
        format(string, sizeof(string), "Account: %s, Password: %d",PlayerInfo[playerid][pAccountMailName], PlayerInfo[playerid][pAccountMailPass]);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        return 1;
Edit: Ooops, error msg in subject
Reply
#5

Strlen gets a lengh of a string and accountname is an integer in your case. Just do if(accountname < 3)
Reply
#6

Thx, works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)