Stock does'nt work correct...
#4

I know the problem.
Код:
OnPlayerSpawn(playerid)
{
	PrintX("Lol? (ID %d)", playerid);
}



stock PrintX(const format[], {Float,_}:...)
{
	new Hour, Minute, Second;
	new Year, Month, Day;
	new LogFile[128], entry[128], File:Log;
	gettime(Hour, Minute, Second);
	getdate(Year, Month, Day);
	format(LogFile, sizeof(LogFile), ServerLog, Day, Month, Year); //>>>>>> RULE 64 <<<<<<
	if(!fexist(LogFile))
	{
		dini_Create(LogFile);
		printf("New Log File: %02d-%02d-%04d.txt", Day, Month, Year);
		Log = fopen(LogFile, io_append);
		format(entry, sizeof(entry), "[%02d:%02d:%02d] %s\r\n", Hour, Minute, Second, string);
		fwrite(Log, entry);
		fclose(Log);
	}
	else
	{
		format(entry, sizeof(entry), "[%02d:%02d:%02d] %s\r\n", Hour, Minute, Second, string);
		Log = fopen(LogFile, io_append);
		fwrite(Log, entry);
		fclose(Log);
	}
	return 1;
}
It must be
Код:
const format[]
and not
Код:
const string[]
But now some errors.
Код:
(64) : error 012: invalid function call, not a valid address
(64) : warning 215: expression has no effect
(64) : warning 215: expression has no effect
(64) : warning 215: expression has no effect
(64) : warning 215: expression has no effect
(64) : warning 215: expression has no effect
(64) : warning 215: expression has no effect
(64) : error 001: expected token: ";", but found ")"
(64) : error 029: invalid expression, assumed zero
(64) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Stock does'nt work correct... - by Remi-X - 19.06.2009, 13:32
Re: Stock does'nt work correct... - by Correlli - 19.06.2009, 13:58
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:04
Re: Stock does'nt work correct... - by Remcconen - 19.06.2009, 14:38
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:54
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 15:16
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 15:28
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 16:04
Re: Stock does'nt work correct... - by Nero_3D - 19.06.2009, 16:26
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)