But I told you the arguments
function serverCmdBan(%client,%victim,%victimID,%time,%reason)
Also:
The name method is getPlayerName(), not getName()
%victim is just be the ID (the number that identifies every object, not blid) of the victim at the time, which just becomes a meaningless number after server restart. Use %victim.getPlayerName()
You may also want IP, which the default banlist logs
%time is just the length of the ban. You'll want start time and end time.
also I dislike headers as people with longer names will throw everything out of whack
Then you end up with a bunch of numbers that users may have no idea what they are.
Personally I would either
a) write it as a CSV file, which would be viewable by Excel and other spreadsheet software. You could also use Greek2Me's
CSV reader to read it back into game
or b) write it plain text you like are, but couple it with an in-game viewer add-on