Page 1 of 1

[ltx] Proper usage of " #include " in this case ?

Posted: 27 Dec 2016, 08:35
by Diegtiarov
Hey,

I want to include a file which is 2 directories back from the edited one.
Edited file directory:

Code: Select all

gamedata\configs\scripts\agroprom\smart\


File I want to include directory:

Code: Select all

gamedata\configs\scripts\


More info:
I want the respawn_idle to be set by 1 file instead of all smart terrain files separately.
I've currently got this:

gamedata\configs\scripts\agroprom\smart\agr_smart_terrain_1_2.ltx

Code: Select all

#include "..\..\respawnrates.ltx"

[smart_terrain]:respawn_med
squad_id = 1
max_population = 3
respawn_params = respawn@agr_smart_terrain_1_2

[respawn@agr_smart_terrain_1_2]
spawn_snork

[spawn_snork]
spawn_squads = simulation_snork
spawn_num = 1


gamedata\configs\scripts\respawnrates.ltx

Code: Select all

[respawn_low]
respawn_idle = 900000

[respawn_med]
respawn_idle = 600000

[respawn_high]
respawn_idle = 300000

[respawn_ultra]
respawn_idle = 120000



It crashes saying it couldn't find respawnrates.ltx.
Any thoughts?

Re: [ltx] Proper usage of " #include " in this case ?

Posted: 27 Dec 2016, 17:25
by Alundaio
It might not be possible, that is something I've never had to do.

Re: [ltx] Proper usage of " #include " in this case ?

Posted: 28 Dec 2016, 06:39
by Alexfighter
I don't really know, but in some languages you need to start with a "\" for those reverse paths.

Try this way:
#include "\..\..\respawnrates.ltx"

If it doesn't work in either case, then probably Alundaio will be right and it's not possible.

Re: [ltx] Proper usage of " #include " in this case ?

Posted: 28 Dec 2016, 11:55
by Diegtiarov
I've found an alternative way, instead of 1 file there will be 30 of them for each level so there's no need for impossible backward #include.