problem | Errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem | Errors (
/showthread.php?tid=357262)
problem | Errors -
avivelkayam - 06.07.2012
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 !!
Re: problem | Errors -
Ironboy - 06.07.2012
Remove a_Set function from a_file.inc
Re: problem | Errors -
avivelkayam - 06.07.2012
are you ciruis ?
please give me real answer
by the way the errors is in
and this :
Код:
if(!fexist(file)) return false;