problem | Errors
#1

Hello all, sorry about my bad english

i tried to build stock (a_Set) that like dini_Set
but i have few errors

Код:
C:\Documents and Settings\1\щемзп дтбегд\0.3e шщойъ\pawno\include\a_file.inc(61) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\1\щемзп дтбегд\0.3e шщойъ\pawno\include\a_file.inc(80) : error 079: inconsistent return types (array & non-array)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
this is the code

Код:
	a_Set("Test.ini","ss","Test");
and this is the stock

Код:
stock a_Set(file[], key[], value[])
{
	if(!fexist(file)) return false;
	new File:fpt = fopen(file, io_read),String[200];
	format(String, sizeof(String), "%s.part",file);
	new result[100],line[100],k;
	while (fread(fpt, line))
	{
	    if(!strcmp(key, line, false, strlen(key)))
	    {
			new e = strfind(line, "=");
			strcat(result, line[e+1]); k = 1;
			return result;
	    }
	}
	if(!k)
	{
	    while(fread(fpt, line)) fwrite(fpt, line);
		format(String, sizeof(String), "%s=%s",key,value);
	    fwrite(fpt, String);
	}
	return true;
}
Help me please !!
Reply
#2

Remove a_Set function from a_file.inc
Reply
#3

are you ciruis ?
please give me real answer

by the way the errors is in
Код:
	return true;
and this :

Код:
	if(!fexist(file)) return false;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)