SA-MP Forums Archive
sscanf warning - 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: sscanf warning (/showthread.php?tid=439898)



sscanf warning - OpticKiller - 27.05.2013

duno why its making a huge spam on the log but anyways its the dealership doing it.

Код:
sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<<>.
Код:
LoadDealerships()
{
	new File:handle, count;
	new filename[64], line[256], s, key[64];
	for(new i=1; i < MAX_DEALERSHIPS; i++)
	{
		format(filename, sizeof(filename), DEALERSHIP_FILE_PATH "d%d.ini", i);
		if(!fexist(filename)) continue;
		handle = fopen(filename, io_read);
		while(fread(handle, line))
		{
			StripNL(line);
			s = strfind(line, "=");
			if(!line[0] || s < 1) continue;
			strmid(key, line, 0, s++);
			if(strcmp(key, "Created") == 0) DealershipCreated[i] = strval(line[s]);
			else if(strcmp(key, "Pos") == 0) sscanf(line[s], "p,fff", DealershipPos[i][0],
			DealershipPos[i][1], DealershipPos[i][2]);
		}
		fclose(handle);
		if(DealershipCreated[i]) count++;
	}
	printf("  Loaded %d dealerships", count);
}



Re: sscanf warning - OpticKiller - 27.05.2013

come on please help guys.


AW: sscanf warning - HurtLocker - 27.05.2013

format(filename, sizeof(filename), DEALERSHIP_FILE_PATH "d%d.ini", i);

This line is a mess. Give the #define DEALERSHIP_FILE_PATH line


Re: sscanf warning - Vince - 27.05.2013

Код:
"p<,>fff"



Re: sscanf warning - OpticKiller - 27.05.2013

vince if that works i love u no gay ino the file is a mess am using the dynamic avs vehicle system. take a look at it


Re: sscanf warning - OpticKiller - 27.05.2013

didnt work


AW: sscanf warning - HurtLocker - 27.05.2013

I just noticed dude, do what vince says.


Re: AW: sscanf warning - OpticKiller - 27.05.2013

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
I just noticed dude, do what vince says.
yea i did mate it worked fine thanks for your help both of you seriosuly i been trying & trying to fix this but now i get to god guys come up and help me thanks and its helpful.