I have a script library that includes a bunch of other files for organization's sake. When compiled as-is and included in LOADACS, everything works fine and as expected in game.
If I try to import the library into a map's ACS (e.g, '#import "source/whatever.acs"'), everything will compile fine if I only use functions or variables that are directly in the top-level library file. If I try to reference a variable that is in one of the #included files, then ACC throws an error.
Example Library:
Code: Select all
#library "TEST"
#include "zcommon.acs"
#include "otherfile.acs" //(where otherfile.acs declares function testfunc and int testvar2).
int testvar1;
Code: Select all
#import "source/test.acs"
#include "zcommon.acs"
script 100 (void) { testvar1 = 5; } // This compiles fine
script 200 (void) { testvar2 = 5; } // This throws an error
script 300 (void) { testfunc(); } // This throws an error
EDIT: For reference, here's the actual library script from Blade of Agony that is behind the question.