Quote:
|
Originally Posted by MegaMasterX90875
I'm working on a server and I've come up with an idea to keep from overwriting files (using GS2, I"VE FINALLY MIGRATED TO GS2!!)
This example uses the file test.txt in the levels folder.
Can't I use
NPC Code:
function onCreated&&Fileexists(levels/test.txt)
{
selectfilefordownload(levels/test.txt);
}
Not sure, but the idea checks the player's graal folder for the file before downloading it to the client. Also, should I put this Clientside?
|
NPC Code:
function onCreated() {
temp.check = this.FindFile("levels/test.txt");
if (temp.check == false) {
selectfilefordownload("levels/test.txt");
}
}
function FindFile(filedir) {
if (Fileexists(filedir))
return true;
return false;
}
I think it'd work, not too sure. Never used selectfilefordownload etc. Anyhow, this is how I would probably do it...
And no, I don't think there is a way of doing it like you said