Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Putting scripts in subfolders doesn't work  (Read 1432 times)

0 Members and 1 Guest are viewing this topic.

Offline MattyDienhoff

  • Members
  • *
Putting scripts in subfolders doesn't work
« on: 21 Oct 2009, 12:42:41 »
For the sake of organization, I'm putting some of the scripts I'm using in my mission in a subfolder within the mission folder (For example: "\mission.eden\scripts\script.sqs")

I execute the script in the mission by adding the following to a unit's init: "[this,0] exec "/scripts/script.sqs" and preview the mission, and that works fine.

However, if I PBO the file via the mission editor and play it as an SP or MP mission, I get this error when I reach the briefing screen:

"Script /scripts/script.sqs not found"

I re-extracted the PBO and the script is still there, intact, so it didn't get left out. I tried compressing the mission with MakePBO, rather than through the mission editor, and that doesn't make any difference. It just works fine in the mission editor, but doesn't once the mission is compressed, and I can't figure out why. What am I doing wrong?

Offline tcp

  • Members
  • *
    • Violator Gaming
Re: Putting scripts in subfolders doesn't work
« Reply #1 on: 21 Oct 2009, 17:01:43 »
Use only backslashes \ for files (forwardslashes are for web URL)
The leading backslash is also not need, but can be used. So:
[this,0] exec "scripts\script.sqs"