%filePath = "config/server/savechecks/" @ %client.BL_ID @ ".txt";
%file=new FileObject();
%file.openForWrite(%filePath);
%file.writeLine(%client.checkpointbrick);
%file.close();
%file.delete();
So this does not have access to write files on the server?
How to fix it
This should work.
Make sure the file-path is right.
infact, what are you wanting to do? are you wanting to make a command for it to save the client's position in the same spot as before?
function ServerCmdSavePosition(%cl) {
%filepath = "config/server/playerpositions/" @ %cl.bl_id @ ".txt";
%CheckpointPosition = %cl.checkpointbrick.getposition();
%file = new fileObject();
%file.OpenForWrite(%filepath);
%file.WriteLine(%checkpointPosition);
%file.close();
%file.delete();
}
function ServerCmdLoadPosition(%cl) {
%filepath = "config/server/playerpositions/" @ %cl.bl_id @ ".txt";
%file = new fileObject();
%file.OpenForRead(%filepath);
%position = %file.ReadLine();
%client.player.setTransform(%position);
%file.close();
%file.delete();
}
^^ that should work from what i scrapped up from my ass, feel free to make it better and do whatever.
I have made SavePosition different because then whenever you crash or something, the .checkpointbrick ID will change, therefore it could spawn you anywhere. therefore i have saved the checkpoint position.