renpy / vscode-language-renpy

Ren'Py extension for Visual Studio Code
Other
105 stars 22 forks source link

[Bug (Minor)] False warning flag with persistent variables defaulted in other source files #189

Open pjpollina opened 2 years ago

pjpollina commented 2 years ago

Say I do default persistent.game_clear = False in script.rpy

image

Now say I try referencing it in main_menu.rpy

image

Despite the warning, it still works fine. You can get around the warning by repeating default persistent.game_clear = False in main_menu.rpy, but then this flags a duplicate declaration in Lint. Really minor issue, and honestly I dunno if it's even worth spending that much time on to fix, but felt I might as well bring it to your attention.

Gouvernathor commented 2 years ago

I got the same warning, but with the variable being in the same file, only further down. image

Gouvernathor commented 2 years ago

Also, I would advise the error message to only say "not been defaulted", because using define with persistent is now a lint warning.