- 24
- 1
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DLG_REG:
{
if(response)
{
if(!strlen(inputtext))
{
ShowRegistration(playerid);
return SCM(playerid, COLOR_RED, "[Ошибка] {FFFFFF}Введите в поле ниже и нажмите \"Далее\"");
}
if(strlen(inputtext) < 8 || (strlen(inputtext) > 24)
{
ShowRegistration(playerid);
return SCM(playerid, COLOR_RED, "[Ошибка] {FFFFFF}Длина пароля должна быть от 8-ми до 24-ух символов");
}
new regex:rg_passwordcheck = regex_new("^[a-zA-Z0-9]{1,}$");
if(regex_check(inputtext, rg_passwordcheck))
}
else
{
SCM(playerid, COLOR_RED, "Используйте \"/q\" чтобы покинуть сервер");
SPD(playerid, -1, 0, "", "", "", "");
return Kick(playerid);
}
}
}
return 1;
}
ОШИБКИ -
D:\server\gamemodes\name.pwn(294) : error 028: invalid subscript (not an array or too many subscripts): "strlen"
D:\server\gamemodes\name.pwn(296) : warning 217: loose indentation
D:\server\gamemodes\name.pwn(298) : warning 217: loose indentation
D:\server\gamemodes\name.pwn(300) : error 029: invalid expression, assumed zero
D:\server\gamemodes\name.pwn(300 -- 301) : warning 215: expression has no effect
D:\server\gamemodes\name.pwn(301) : error 001: expected token: ";", but found "else"