Having trouble with savelines and the only thing I found from forum search is one thread that didnt quite explain it (Although i tried to user similar style).
Anyways I am trying to write to a file on the server, and when it creates the file it creates it as an empty file, and later nothing is added either.
I have tried it both clientside and serverside and the file created is 0kb
I have done it from the onCreated and onActionserverside.
Not so sure if this is a bug or If I am doing something wrong.
NPC Code:
function onActionServerside() {
if (params[0] == 0) {
write = params[1];
write.savelines("test.txt", 0);
}
}
//#CLIENTSIDE
function onplayerchats() {
test = player.chat;
triggeraction(playerx, playery, "serverside", "James/Test", 0, test);
}