1 registered members (AndrewAMD),
1,454
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Where does save_dir get its value ?
#246432
01/15/09 07:51
01/15/09 07:51
|
Joined: Sep 2001
Posts: 375 Hamburg, Germany / Springfield...
Andreas C
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
|
I have some issue with some lite-C (A7.66 Pro) code, where a file_open_write command is used.
When the file does not exist, it tries to create it (as is stated in the manual) in the save_dir directory.
The problem I see is that save_dir is NULL, which causes a whole set of issues (i.e. the file handle returned from file_open_write is '0' and any subsequent attempts to write to the file cause a crash [invalid pointer] ...). I know how to work around this issue, but one thing that interests me is where / how the save_dir is intialized (I know that I could set it in a .WDL ... I want to know how the engine does it).
Cheers, Andreas
____________________________________________________ GameCore / Unity / UDK Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5 TextureMaker / PSP-X
|
|
|
Re: Where does save_dir get its value ?
[Re: Andreas C]
#246489
01/15/09 12:57
01/15/09 12:57
|
Joined: Sep 2001
Posts: 375 Hamburg, Germany / Springfield...
Andreas C
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
|
Any help would be appreciated ...
Cheers, Andreas
Last edited by Andreas C; 01/18/09 21:03.
____________________________________________________ GameCore / Unity / UDK Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5 TextureMaker / PSP-X
|
|
|
Re: Where does save_dir get its value ?
[Re: Andreas C]
#247082
01/18/09 22:07
01/18/09 22:07
|
Joined: Jul 2008
Posts: 894
TechMuc
User
|
User
Joined: Jul 2008
Posts: 894
|
manual: The folder for saving files, game scores, and screenshots. By default, it's the work folder; it can be set to another folder with the -dir command line option or the SAVEDIR statement in a WDL file.
|
|
|
Re: Where does save_dir get its value ?
[Re: TechMuc]
#247152
01/19/09 08:40
01/19/09 08:40
|
Joined: Sep 2001
Posts: 375 Hamburg, Germany / Springfield...
Andreas C
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
|
manual: The folder for saving files, game scores, and screenshots. By default, it's the work folder; it can be set to another folder with the -dir command line option or the SAVEDIR statement in a WDL file.
Yup ... I read that, but the point is that the save_dir is not set to point to the work directory ... it's an empty (NULL?) string when I show it (via printf()) ... I know that the "-dir" option is supposed to set it (as well as the SAVEDIR in a WDL file), but I am just frustrated / surprised that it does not (apparently) point to the work directory as it should (according to the manual) ... Cheers, Andreas
____________________________________________________ GameCore / Unity / UDK Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5 TextureMaker / PSP-X
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|