When i make a script some times it says insert a semicolon but there already is a semi colon on the line it tells me to put it on so can someone help me out with this problem?
1 Answer
1You must post the script here, or nobody can show how to fix it!
Anyway, if Unity tells you that there’s a missing semicolon, you can bet your life that something is wrong with your code - but not necessarily a missing semicolon: sometimes an extra or missing word may fool the compiler and make it “thinks” that the line should end earlier, what generates this error even when the line already has a semicolon.
If you write this line in a JS script, for instance:
var float x;
Unity will tell you to append a semicolon at the end, but the right syntax should be:
var x: float;