- Home /
learning the basics(9,18): UCE0001: ';' expected. Insert a semicolon at the end.
hi i was wondering if any1 can help me i am learning the basics of scripting and following a guide online, i have written everything the same as the guide but when i play my code i receive an error on the print statement on line 9.
this is the error i am getting
Assets/scripting_basics_1.js(9,18): UCE0001: ';' expected. Insert a semicolon at the end.
and this is the code
function Update () { var ammoBoxInt : int = 10;
var ammoBoxFloat : float = 5.567;
var ammoBoxString : String = "ammoBox";
var ammoBoxBoolean : boolean = true;
print {ammoBoxInt};
}
also i am using monoDevelop-unity but in the guide they were using UniSciTe, if that makes any difference. thank you
Answer by delVhar · Apr 29, 2013 at 02:15 AM
I think the problem is that you have used curly brackets instead of parentheses (normal brackets) on the print function.
Try editing it to look like:
function Update ()
{
var ammoBoxInt : int = 10;
var ammoBoxFloat : float = 5.567;
var ammoBoxString : String = "ammoBox";
var ammoBoxBoolean : boolean = true;
print (ammoBoxInt);
}
Answer by zi-fi studios · Apr 29, 2013 at 10:15 PM
Thank you very much. problem solved. wrong brackets.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Writing My Own Scripts 3 Answers
Footstep Script Not Working 2 Answers
TERA style movement 1 Answer