stock IsAdvertisement(text[]) { new NuCnt,DotCnt; for (new i = 0, l = strlen(text); i < l; i++) { if(text != ("SERVER_IP")) //How to do this right ? if ('0' <= text[i] <= '9'){ NuCnt++; continue;} if(text[i] == '.' || text[i] == ':' || text[i] == '_') if(text[i+1] != '.' && text[i+1] != ':' && text[i+1] != '_') DotCnt++; if (NuCnt >= 7 && DotCnt >= 3) return true; } return false; }
error 033: array must be indexed (variable "text") |
stock IsAdvertisement(text[])
{
new NuCnt,DotCnt;
for (new i = 0, l = strlen(text); i < l; i++)
{
if(strlen(text) > 0 && strcmp(text, ("SERVER_IP"), true) == 0) // Correct way without sscanf..
if ('0' <= text[i] <= '9'){
NuCnt++; continue;}
if(text[i] == '.' || text[i] == ':' || text[i] == '_')
if(text[i+1] != '.' && text[i+1] != ':' && text[i+1] != '_')
DotCnt++;
if (NuCnt >= 7 && DotCnt >= 3)
return true;
}
return false;
}