Need Help!
#1

How do I fix this?

Код:
stock SaveAPoint()
{
    if(!fexist("ArrestPoints.cfg")) fcreate("ArrestPoints.cfg");
	new idx = 1, File:file;
	new string[256];
	while(idx < MAX_ARRESTPOINTS)
	{
	    format(string, sizeof(string), "%d|%d|%d|%s\r\n",AInfo[idx][arX],AInfo[idx][arY],[AInfo[idx][arZ],AInfo[idx][arName]);
	    if(idx == 1)
	    {
	        file = fopen("ArrestPoints.cfg", io_write);
	    }
	    else
	    {
	    	file = fopen("ArrestPoints.cfg", io_append);
	    }
		fwrite(file, string);
		fclose(file);
		idx++;
	}
	print("Arrest Points Saved.");
	return 1;
}
And these are the Errors I get.

C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 029: invalid expression, assumed zero
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : warning 215: expression has no effect
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : warning 215: expression has no effect
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 001: expected token: ";", but found ")"
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 029: invalid expression, assumed zero
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : fatal error 107: too many error messages on one line
Reply
#2

I guess the problem is in "format" you got it like this:

"[AInfo[idx][arZ],"

I think it shouldn't have the "[" up there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)