Jump to content
Horner

Accessing root directory through script.

Recommended Posts

Hey all,

 

I've been out of the game for a while and seem to have forgot a bit about SQF :P. Anyways, how I used to code, I would call a separate init.sqf inside of a folder in the root directory, as opposed to running my code through the mission file. The idea was that the code could be packaged into a pbo and run as an addon with no directory issues. Here is how I believe i used to accomplish this...

 

// "folder" is a folder inside ..\common\Arma 3.
// Directory would still be valid if "folder" were to be packaged and run as an addon.
call compile preProcessFile "\folder\init.sqf";

 

However this doesn't seem to work anymore, I'm not sure if it's because my game is running on a separate hard drive from the mission file? Anyways, hopefully somebody can share a little insight because this was always the easiest way for me to develop.

Share this post


Link to post
Share on other sites

Most likely due to the changes to filePatching. Files from outside the mission can no longer be loaded without starting your client/server with the attribute -filePatching. WIKI

Share this post


Link to post
Share on other sites

Yeah, I literally just found that. Turning on file patching in the params works!

 

Turns out they added that feature 2 years ago, my lord it has been longer than I thought... Thanks!

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

×