SA-MP Forums Archive
What's wrong?! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong?! (/showthread.php?tid=96317)



What's wrong?! - honzk - 07.09.2009

Код:
stock WriteAdminLog(playerid, string[])
{
	new File:adminfile, name[256], admintext[256], writetext[256];
	GetPlayerName(playerid, name, sizeof(name));
	format(admintext, sizeof(admintext), "AdminLogs/%s.log", name);
	format(writetext, sizeof(writetext), "%s\n\r", string);
	adminfile = fopen(admintext, io_append);
	fwrite(adminfile, writetext);
	fclose(adminfile);
	return 1;
}
No warn, no error, but server falls when i type /money (it contains "WriteAdminLog(playerid, "money");")


Re: What's wrong?! - bjehna - 07.09.2009

Are you sure you have created the AdminLogs folder in Scriptfiles?