30.11.2011, 11:28
(
Последний раз редактировалось GabrielDias_Invision; 30.11.2011 в 12:43.
)
@RESOLVIDO
stock IsARoleplayName(playerid)
{
new strg[24],underscore;
GetPlayerName(playerid, strg, 24);
if(strg[0] < 'A' || strg[0] > 'Z') return false;
for(new i = 1; i < 24; i++)
{
switch(strg[i])
{
case '\0':
{
if(i < 2) return false;
return true;
}
case 'a'..'z': continue;
case '_':
{
underscore++;
if(underscore == 2) return false;
i++;
if(strg[i] < 'AA' || strg[i] > 'Z') return false;
}
default: return false;
}
}
return true;
}
D:\GTA\Server\gamemodes\BVL.pwn(4030) : error: 027: invalid character constant
D:\GTA\Server\gamemodes\BVL.pwn(4030) : error: 017: undefined symbol "A"
D:\GTA\Server\gamemodes\BVL.pwn(4030) : error: 029: invalid expression, assumed zero
D:\GTA\Server\gamemodes\BVL.pwn(4030) : error fatal: 107: too many error messages on one line
stock IsARoleplayName(playerid)
{
new strg[24];
GetPlayerName(playerid, strg, 24);
if(!strfind(sendername, "_", true)) return false;
for(new i = 1; i < 24; i++)
{
if(strg[i] >= 33 && strg[i] <= 64 || strg[i] >= 91 && strg[i] <= 96) return false;
}
return true;
}