[FTE]Saving custom cfg error

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

[FTE]Saving custom cfg error

Post by toneddu2000 »

Hi guys. FTE doesnt' allow to save custom cfg with the command

Code: Select all

cfg_save foo
It says:

Code: Select all

Couldn't write config c:\blah\mygame\data/configs/foo.cfg (if disablehomedir is set to 1 in default.fmf manifest file) or Couldn't write config c:\Users\blah\Documents/Mygames/FTE Quake/data/configs/foo.cfg if disablehomedir is set to 0
Instead, if I create by myself the foo.cfg in the configs folder and I read it via

Code: Select all

localcmd("cfg_load foo\n");
and then

Code: Select all

float myval= cvar("my_cfg_val");
the value is retrieved!
:?: Is it a bug or did I miss a step?

Any help will be appreciated and thanked as always!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Max_Salivan
Posts: 96
Joined: Thu Dec 15, 2011 1:00 pm

Re: [FTE]Saving custom cfg error

Post by Max_Salivan »

cfg_save_all "If 1, cfg_save ALWAYS saves all cvars. If 0, cfg_save only ever saves archived cvars. If empty, cfg_save saves all cvars only when an explicit filename was given (ie: when not used internally via quit menu options)."
Sorry for my english :)
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: [FTE]Saving custom cfg error

Post by toneddu2000 »

thanks Max_Salivan , but cfg_save_all is set to "", so, technically, it should work. Plus, if I set cfg_save_name to foo for example, and I query cfg_save_name, it says foo, but when I issue cfg_save command, it saves all the cvars to fte.cfg!
Is it also possible to save only specified cvars to a .cfg file?
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: [FTE]Saving custom cfg error

Post by Dr. Shadowborg »

Code: Select all

Couldn't write config c:\blah\mygame\data/configs/foo.cfg (if disablehomedir is set to 1 in default.fmf manifest file) or Couldn't write config c:\Users\blah\Documents/Mygames/FTE Quake/data/configs/foo.cfg if disablehomedir is set to 0
O_o

Is it supposed to be mixing the back and forward slashes like that in the paths?
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: [FTE]Saving custom cfg error

Post by toneddu2000 »

Dr. Shadowborg wrote: O_o

Is it supposed to be mixing the back and forward slashes like that in the paths?
yeah, FTE does it (at least on Windows)
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: [FTE]Saving custom cfg error

Post by Spike »

make sure the directory it says actually exists.

FTE internally uses forward slashes everywhere, because they work everywhere (there's a few microsoft-specific exceptions to that, but they don't apply to standard C).
the backslashes can arise from using microsoft functions to query working directories etc. There's also a few mods that explicitly use backslashes, so the engine has to tolerate them regardless.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: [FTE]Saving custom cfg error

Post by toneddu2000 »

Spike wrote:make sure the directory it says actually exists.
Thanks Spike, but it totally exists. Infact, if I try to read via localcmd("cfg_load foo\n"); the foo.cfg in configs/ folder is read perfectly. And, even if folder doesn't exist, when command is issued, fte DOES create folder but does not create .cfg file
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Post Reply