cwtools / cwtools/cwtools-vscode

"Expecting a variable, but got a scope"

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
110
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/cwtools/cwtools-vscode/assets/72775658/cf75fd55-1809-4f49-a683-8815213471d3)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.