Page MenuHomeFeedback Tracker

its not possible to use the doubleDot("../fileXY.bla") dir in connection with #include to get a dir up
Closed, ResolvedPublic

Description

With the current version its not possible to use the doubleDot ('..') to get a directory up

Meaning
you got this file structure:

FileA

DirAB

>FileB
and you use #include to get fileA into fileB (#include "../FileA") will result in a crash of the game because the file could not be found

------------------

Why no absolute path?
Because if you use absolute pathes you cant reuse the same script without editing all the files to name them propper again {F22987}

Details

Legacy ID
3275663304
Severity
None
Resolution
Duplicate
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Requirements:

  1. create a new plain mission
  2. Add a init.sqf file to the mission root
  3. Add a fileA.sqf file to the mission root
  4. Add a folder to the mission (name does not matters)
  5. Add a fileB.sqf file into the folder created at step 3
  6. Add the following line to fileB.sqf: #include "../fileA.sqf"
  7. Add the two files to a CfgFunctions config

(You also can download the attachement)

StepsToReproduce:

  1. Load the mission and preview it (if you get to this step)

Event Timeline

X39 edited Steps To Reproduce. (Show Details)Dec 31 2013, 7:45 PM
X39 edited Additional Information. (Show Details)
X39 set Category to Scripting.
X39 set Reproducibility to Always.
X39 set Severity to None.
X39 set Resolution to Duplicate.
X39 set Legacy ID to 3275663304.May 7 2016, 5:41 PM
X39 added a subscriber: X39.