iw7-mod
iw7-mod copied to clipboard
Can't include other custom scripts in gsc script
When trying to include other custom scripts in my gsc script using #include
, I get the following error:
main.gsc
#include custom_scripts\test;
init()
{
print("Print from main.gsc");
test_print();
}
test.gsc
test_print()
{
print("Print from test.gsc");
}
Output
*********** script compile error *************
failed to compile 'custom_scripts/main':
[ERROR]: parsing include file 'custom_scripts/test': Could not load gsc file 'custom_scripts/test'
**********************************************
However, calling functions from other custom scripts like this seems to work just fine:
init()
{
print("Print from main.gsc");
custom_scripts\test::test_print();
}
Output
Print from main.gsc
Print from test.gsc
I can also include stock scripts just fine, so this seems to only be related to custom scripts.