SA-MP Forums Archive
Please help.. - 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: Please help.. (/showthread.php?tid=560560)



Please help.. - scout322 - 29.01.2015

Код:
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]


Re: Please help.. - Pboachie - 29.01.2015

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