y_ini - check if entry exists
#7

Why do all that when you can just do this?
Код:
new File: file = fopen("file.ini", io_read);
if (!file) return 1;

new str[128], bool: found;
while (fread(file, str))
{
    if (strcmp(str, "entry =", false, LENGTH OF THE ENTRY + 2 (7 here) ))
        continue;
    found = true;
}
fclose(file);

// Use the found variable to see if it exists or not.
Reply


Messages In This Thread
y_ini - check if entry exists - by Brooks1 - 07.07.2016, 11:37
Re: y_ini - check if entry exists - by F1N4L - 07.07.2016, 11:43
Re: y_ini - check if entry exists - by Brooks1 - 07.07.2016, 11:45
Re: y_ini - check if entry exists - by Konstantinos - 07.07.2016, 11:56
Re: y_ini - check if entry exists - by Brooks1 - 07.07.2016, 12:19
Re: y_ini - check if entry exists - by Konstantinos - 07.07.2016, 12:46
Re: y_ini - check if entry exists - by Stinged - 07.07.2016, 13:12

Forum Jump:


Users browsing this thread: 2 Guest(s)