How to retrieve number of keys in a file?
EDIT:
I wrote a quick stock to count the number of keys
will this work?
Code:
stock nfv_get_keys_num(szFile[], const identifier=';')
{
new f = fopen(szFile, "r")
if( !f )
return 0
new iNum, line[3], i
while(!feof(f))
{
fgets(f, line, charsmax(line))
if(line[0] == identifier)
++i
}
fclose(f)
return i
}
EDIT2:
After secound thought, it turned to be useless as I can't loop through all entries :\
Too bad ...
__________________