View Single Post
  #2  
Old 05-24-2006, 04:28 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
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

Last edited by xAndrewx; 05-24-2006 at 11:47 PM..
Reply With Quote