Location of saved file - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Location of saved file (
/showthread.php?tid=223454)
Location of saved file -
Anteino - 09.02.2011
Hi guys,
This is a part of my script:
Код:
new File:ftw=fopen("../players/names.txt", io_readwrite);
Now if i start that my server will crash when it is performed. I don't know why? How to save your file to a defined location in your sampserver map?
Re: Location of saved file -
Medal Of Honor team - 09.02.2011
it happens when the server could not locate the file. Are you sure your file exist's and located in the proper directory?
Re: Location of saved file -
Anteino - 09.02.2011
io_readwrite will automatically make a new file when it doesn't exist jet :S So that won't be the problem
Re: Location of saved file -
Medal Of Honor team - 09.02.2011
I did not noticed it. Why do you think only that line can cause crash?
Re: Location of saved file -
DRIFT_HUNTER - 09.02.2011
Do you have
players folder in your samp folder?
Re: Location of saved file -
Anteino - 09.02.2011
Quote:
Originally Posted by Medal Of Honor team
I did not noticed it. Why do you think only that line can cause crash?
|
I'm asking you you comic xD
Re: Location of saved file -
Anteino - 09.02.2011
Quote:
Originally Posted by DRIFT_HUNTER
Do you have Players folder in your samp folder?
|
Of course i have
Re: Location of saved file -
HyperZ - 09.02.2011
Try this:
pawn Код:
new string[256];
new File:ftw = fopen("/players/names.txt",io_readwrite);
fread(ftw,string);
Re: Location of saved file -
Ash. - 09.02.2011
../ - Scripts cannot leave the script files directory (from my experience)
Remove
Re: Location of saved file -
Anteino - 09.02.2011
Quote:
Originally Posted by Clive
Try this:
pawn Код:
new string[256]; new File:ftw = fopen("/players/names.txt",io_readwrite); fread(ftw,string);
|
That will crash the server also. I want to know of you can save it outside the scriptfiles folder

?