Jump to content
Sign in to follow this  
Dschulle

#include in description.ext possible?

Recommended Posts

Is it possible to use the #include command, which works on config files, in the description.ext?

When I tried it, OFP crashed with an "preprocessor error -1", which indicates, that the command is recognized as a preprocessor directive.

It would be very useful to easy integrate things like Keygeteys Spectate Script into any mission.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Dschulle @ Jan. 04 2003,13:27)</td></tr><tr><td id="QUOTE">Keygeteys Spectate Script<span id='postcolor'>

Eek, now the imposters have started copying my scripts too D:

Share this post


Link to post
Share on other sites

We never used #include in description.ext and I am therefore unable to tell you how it should work. I would expect there will be problems with the paths where preprocessor looks for the included files. I assume the current directory during description.ext loading is not where description.ext is, but on in the OFP folder (where exe is).

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ Jan. 08 2003,09:53)</td></tr><tr><td id="QUOTE">We never used #include in description.ext and I am therefore unable to tell you how it should work. I would expect there will be problems with the paths where preprocessor looks for the included files. I assume the current directory during description.ext loading is not where description.ext is, but on in the  OFP folder (where exe is).<span id='postcolor'>

I've tested this. It looks in the EXE-folder, like Suma said!

I used:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#include <test.h>

<span id='postcolor'>

It even worked with creating a directory "include" in the EXE-folder, and then include <include\test.h>.

Share this post


Link to post
Share on other sites

I know this is really old...but I just wanted to say...NEAT.

Well, sort of neat.  Too bad it requires the mission folder name because everyone seems to change that.

Also too bad BIS didn't just release resource.hpp in the bin directory so that we could #include that and never have to define all that dialog stuff!  wink_o.gif

Doolittle

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×