Page MenuHomeFeedback Tracker

#Include crashes game and/or preprocessor fails to resolve file paths properly
Closed, ResolvedPublic

Description

I'm having some troubles on structuring my project in a sane way.

Basically I few scripts in my mission folder. They are organized into subfolders A and B.
Now, I have a script in folder A, that includes like so:

#include "..\B\geometryFunctions.sqf"

Apparently this doesn't work and the #include crashes my game with the following error message (manoeuvres is folder A and utils is folder B):
http://i.imgur.com/3naLm0L.png

Would be nice to see this fixed. {F23282} {F23283} {F23284}

Details

Legacy ID
1299939851
Severity
None
Resolution
Duplicate
Reproducibility
Always
Category
Game Crash

Event Timeline

Xendance edited Steps To Reproduce. (Show Details)Feb 17 2014, 1:40 PM
Xendance edited Additional Information. (Show Details)
Xendance set Category to Game Crash.
Xendance set Reproducibility to Always.
Xendance set Severity to None.
Xendance set Resolution to Duplicate.
Xendance set Legacy ID to 1299939851.May 7 2016, 5:58 PM
Xendance added a subscriber: Xendance.

Added a sample mission to demonstrate the crash. Mission consists of a simple radio trigger that executes a script in path "A\AScript.sqf", and that script includes "..\B\BScript.sqf".

"..\B\BScript.sqf"

you cannot go up only down.

You should change the title, as the crashing in itself is intended; what doesn't work properly is most likely the path resolving.

I would argue that crashing the game isn't necessary when the preprocessor fails to find the file.

But anyway, I added log and crash dump files. I'll try the workaround.

workaround is not optimal though as it will need to compile and then call the code at runtime and depending on the size of the included file the performance may vary. #include would have been a better option.

You cannot address parent directories, hence the crash. As such, this is a duplicate of #9629 and I will close it.