From http://community.bistudio.com/wiki/PreProcessor_Commands#.23include
To move to parent directory use '..' (two dots):
#include "..\codestrip.txt"
But this doesn't really work.
{F19959}
From http://community.bistudio.com/wiki/PreProcessor_Commands#.23include
To move to parent directory use '..' (two dots):
#include "..\codestrip.txt"
But this doesn't really work.
{F19959}
The last time i tried it still didnt work... that's kind of annyoing as you can't create a proper filestructure. You either have to put all functions in the parent folder or you have to duplicate the files you want to include. Neither of them is very satisfying.-> makes programming less fun!
I've attatched a mission accessing absolute path "res\mydefines.hpp" via #include directive (see mycode\fn_test.sqf) - this will crash the game. This same mission calls preprocessFile "res\mydefines.hpp" (see init.sqf) and it works just fine. It would be nice if #include (when failed to find a file starting from current folder) will try to find the file starting from mission root.
No official response on something so simple? Why has this not been addressed in some manner yet? Seems so simple...
I've been using preprocessFileLineNumbers as a workaround, but it just seems like this should be working.
Duplicating the files isn't realy a option if you going to use the includes for configuration by the user. I find this very frustrating too.
Fixed on dev, rel path is now supported https://community.bistudio.com/wiki/PreProcessor_Commands#.23include [^]