Location of saved file
#1

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?
Reply
#2

it happens when the server could not locate the file. Are you sure your file exist's and located in the proper directory?
Reply
#3

io_readwrite will automatically make a new file when it doesn't exist jet :S So that won't be the problem
Reply
#4

I did not noticed it. Why do you think only that line can cause crash?
Reply
#5

Do you have players folder in your samp folder?
Reply
#6

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
Reply
#7

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Do you have Players folder in your samp folder?
Of course i have
Reply
#8

Try this:
pawn Код:
new string[256];
new File:ftw = fopen("/players/names.txt",io_readwrite);
fread(ftw,string);
Reply
#9

../ - Scripts cannot leave the script files directory (from my experience)

Remove

pawn Код:
../
Reply
#10

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 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)