Answer the question
In order to leave comments, you need to log in
In different case (switch case) it is impossible to use the same variables?
Kodu has been around for a long time and just now stumbled upon a problem: when processing switch cases in different cases, I get the same answer variables, but with a different value. The compiler swears that I duplicate the name of the variable, although it is in two different cases.
It is hard to believe that it is impossible to name variables in different cases the same way. This is some nonsense.
Answer the question
In order to leave comments, you need to log in
He probably swears that you write var several times.
All vars are taken out (and executed at the beginning of the function), no matter where they are in the code.
Declare a variable 1 time at the beginning of the function, and then use it at least in all branches.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question