Please help..
#1

Код:
stock LoadWeed()
{
	new binfo[21][32];
	new string[256];
	new File:file = fopen("weed.cfg", io_read);
	if(file)
	{
	    new idx = 1;
		while(idx < MAX_WEED)
		{
		    fread(file, string);
		    split(string, binfo, '|');
		    GarageInfo[idx][wState] = strval(binfo[0]); //3232
		    GarageInfo[idx][wX] = floatstr(binfo[1]); //3233
		    GarageInfo[idx][wY] = floatstr(binfo[2]); //3234
		    GarageInfo[idx][wZ] = floatstr(binfo[3]); //3235
			idx++;
	    }
	}
	print("Weed loaded successfully.");
	return 1;
}

stock SaveWeed()
{
	new idx = 1, File:file;
	new string[256];
	while(idx < MAX_WEED)
	{
	    format(string, sizeof(string), "%d|%f|%f|%f\r\n", //3249
	    GarageInfo[idx][wState], //3250
	    GarageInfo[idx][wX], //3251
	    GarageInfo[idx][wY], //3252
	    GarageInfo[idx][wZ] //3253
		);
	    if(idx == 1)
	    {
	        file = fopen("weed.cfg", io_write);
	    }
	    else
	    {
	    	file = fopen("weed.cfg", io_append);
	    }
		fwrite(file, string);
		fclose(file);
		idx++;
	}
	print("Weed saved successfully.");
}
What have i done wrong ?

(3232) : warning 213: tag mismatch
(3233) : warning 213: tag mismatch
(3234) : warning 213: tag mismatch
(3235) : warning 213: tag mismatch
(3249 -- 3250) : warning 213: tag mismatch
(3249 -- 3251) : warning 213: tag mismatch
(3249 -- 3252) : warning 213: tag mismatch
(3249 -- 3253) : warning 213: tag mismatch[/CODE]
Reply
#2

You may have deleted a Semi colon ( ; ) before this code. Check the lines on top of the code provided.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)