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

"Expecting a variable, but got a scope" #95

Open
indexoquarto opened this issue Sep 3, 2023 · 0 comments
Open

"Expecting a variable, but got a scope" #95

indexoquarto opened this issue Sep 3, 2023 · 0 comments

Comments

@indexoquarto
Copy link

indexoquarto commented Sep 3, 2023

CWTools will throw an error if you try to compare a variable to a scope. However, the game allows you to save scopes as variables. I'm not sure if that's an issue with the Victoria 3 config files specifically, or the VSCode extension itself, but I don't know how to fix it.

For instance you could do

set_global_variable = {
    name = treaty_law_var
    value = law_type:law_extensive_naval_treaty
}

And then use it as a condition

limit = { 
    global_var:treaty_law_var = law_type:law_extensive_naval_treaty
}

And the game will recognize it and run as expected.

image

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