0 Members and 1 Guest are viewing this topic.
procedure Save(ID)begin WriteLnFile(Name+'.ini', data);endOnLeaveGame(id, kicked)begin Save(ID);endOnPlayerCommand(ID, Text)begin if GetPiece(Text, ' ', 1) = '/logout' then Save(ID);end
is that your whole script?
@ShadowDancer: A person's name can contain stuff that a filename cannot (a '?' for example, I think...).You must change the person's name into something that can be guaranteed the ability to save it.Maybe a function EncodeString(const Str: string): string; which converts each character into a 2-character hex value (exactly double in length; but you must prefix with 0 for numbers between 0 and F (00, 01, 02, ...0E, 0F, 1A, ..., FF)
I found in another topic something about ini files, maybe it can be because of storing data inside ini files?
lol Pseudocode. I'm calling function save in onplayerleave event. Function save contains WriteFIle, that creates file, and next filling it with WriteFileLn