Syntax: savelog2(string filepath, string text);
The file path always begins with the directory logs/*, so just having a filename in the first argument is fine.


Creates a new text file if the one specified in the first argument does not already exist.
Appends to the file the current date and time, and on the next line after that, it appends what was specified in the second argument.


function onPlayerChats()
	if ("/summon"))
		temp.t =;
		findPlayer(temp.t[1]).setlevel2(, player.x, player.y);
		savelog2("summonlog.txt", player.account " summoned " @ temp.t[1] @ " to " @ @ ".");

... Will save everything into a text file called summonlog.txt whenever a staff member summons a player.

If you open the text file, this is what it may output:

Time: Wed May  6 00:44:38 2009
Stefan summoned unixmad to onlinestartlocal.nw. 



There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki