hi everyone, i have a question:
my code is the following
switch (temp)
{
case 1:
other.gameObject.GetComponent().durata_dash += 0,0225f;
break;
case 2:
other.gameObject.GetComponent().durata_dash += 0,0225f;
break;
case 3:
other.gameObject.GetComponent().durata_dash += 0,03f;
break;
}
and the compiler keeps saying this:
error CS1002: ; expected
error CS1513: } expected
i really cant’ find out what is the problem here. The syntax seems ok so what is the problem?
Please post your whole class and the whole error messages, because it says in which line the errors are.
To post code use Code-Tags, to make it readable.
1 Like
Yoreki
April 1, 2021, 10:05am
3
The only thing i see thats not right here is that you use a comma instead of a dot for your floating point numbers. Change that. It may confuse the compiler and cause the other error messages. If thats not it, do what @Sphinks said and post your whole class using code tags and the entire error messages please.
1 Like
Yoreki:
The only thing i see thats not right here is that you use a comma instead of a dot for your floating point numbers. Change that. It may confuse the compiler and cause the other error messages. If thats not it, do what @Sphinks said and post your whole class using code tags and the entire error messages please.
It was the point like you said -.-
Thanks everyone and sorry
1 Like
ah yes good point by @Yoreki . Totally overlooked that, because of local differences >.<. Always havbe problems with that…
1 Like