Variables not declared in auto JS generation

I see you are using quite an old version: 2022.2.4

Do you have any loops?