Got a little prob. with error 008.
#5

Here:

Код:
stock dini_Get(filename[],key[]) {
	new tmpres[DINI_MAX_STRING];
	
	new key_length = strlen(key);
	if (key_length==0 || key_length+2>DINI_MAX_STRING) return tmpres;
	
	new File:fohnd;
	fohnd=fopen(filename,io_read);
	if (!fohnd) return tmpres;
	
	while (fread(fohnd,tmpres)) {
		if (
			tmpres[key_length]=='='
			&& !strcmp(tmpres, key, true, key_length)	
		) {
			/* We've got what we need */
			DINI_StripNewLine(tmpres);
			strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), DINI_MAX_STRING);
			fclose(fohnd);
			return tmpres;
		}
	}
	fclose(fohnd);
	return tmpres;
}
Reply


Messages In This Thread
Got a little prob. with error 008. - by sobolanux - 01.01.2011, 18:55
Re: Got a little prob. with error 008. - by Grim_ - 01.01.2011, 18:58
Re: Got a little prob. with error 008. - by sobolanux - 01.01.2011, 19:07
Re: Got a little prob. with error 008. - by Grim_ - 01.01.2011, 19:15
Re: Got a little prob. with error 008. - by sobolanux - 01.01.2011, 19:28
Re: Got a little prob. with error 008. - by Grim_ - 01.01.2011, 19:31
Re: Got a little prob. with error 008. - by sobolanux - 01.01.2011, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)