07.09.2009, 11:47
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]
[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]