|
[Help] Save_dir
#443090
07/09/14 03:43
07/09/14 03:43
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
OP
Serious User
|
OP
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
str_cpy(save_dir,"C:\\ProgramData\\DLively\\Subfolder\\save_dir")
filehandle = file_open_write ("%SAVE_DIR%\\scores.txt");
if(filehandle == 1){
file_str_write(filehandle,end_input_name_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,end_name_1_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,end_name_2_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,end_name_3_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,input_name_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,name_1_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,name_2_str_i);
file_str_write(filehandle,",");
file_str_write(filehandle,name_3_str_i);
file_close (filehandle);
}
else beep();
This worked once and created the file in this directory - Then I deleted it to see if it would do it again - and no. not only that, but nothing was inputted inside.
Last edited by DLively; 07/09/14 03:45.
|
|
|
Re: [Help] Save_dir
[Re: DLively]
#443111
07/09/14 15:32
07/09/14 15:32
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
OP
Serious User
|
OP
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
Okay,this crates the scores.txt, but does not fill in the scores.txt with the required fields:
filehandle = file_open_write ("C:\\ProgramData\\DLively\\Subfolder\\save_dir\\scores.txt"); if(filehandle == 1){ file_str_write(filehandle,end_input_name_str_i); file_str_write(filehandle,",");
Last edited by DLively; 07/09/14 15:32.
|
|
|
Re: [Help] Save_dir
[Re: DLively]
#443112
07/09/14 15:44
07/09/14 15:44
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
HI, the filehandle variable value will probably change each run and it will probably never be equal to one.
if ( filehandle != 0 )
{...
Salud!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|