rror 033: array must be indexed (variable "nameSplit")
stock IsValidRpNameUsed(playerid)
{
new
name[MAX_PLAYER_NAME],
nameSplit[2][MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
split(name, nameSplit, '_');
if (strfind(name, "_") != -1)
{
if (nameSplit[0] >= 'A' && nameSplit[0] <= 'Z' && nameSplit[1] >= 'A' && nameSplit[1] <= 'Z') return 1;
}
return 0;
}
if ((nameSplit[0][0] >= 'A' && nameSplit[0][0] <= 'Z') && (nameSplit[1][0] >= 'A' && nameSplit[1][0] <= 'Z')) return 1;
Write it like this:
Код:
if ((nameSplit[0][0] >= 'A' && nameSplit[0][0] <= 'Z') && (nameSplit[1][0] >= 'A' && nameSplit[1][0] <= 'Z')) return 1; |