cwtools-vscode icon indicating copy to clipboard operation
cwtools-vscode copied to clipboard

"Expecting a variable, but got a scope"

Open indexoquarto opened this issue 10 months ago • 0 comments

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

indexoquarto avatar Sep 03 '23 18:09 indexoquarto