Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't include other custom scripts in gsc script #277

Open
bradstv opened this issue Jul 19, 2024 · 0 comments
Open

Can't include other custom scripts in gsc script #277

bradstv opened this issue Jul 19, 2024 · 0 comments

Comments

@bradstv
Copy link

bradstv commented Jul 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant