Hello, I encountered the same problem as you, and it was during the transfer… And I found a solution to this problem, maybe you have the same thing)
In the Screenshot, an array that includes a single pin.
And the code is located separately from the main line, because of this the editor does not see it as an error, and when transferred, the compiler reads everything and crashes.