- Home /
Javascript unexpect "f" value
For this code im getting an error saying:"BCE0043: Unexpected token: 2.0f. "
if (Physics.Raycast(myTransform.position, -transform.up, out hitInit, 2.0f, initPosMask.value)) {extra code in here}
And for this code here im getting this error "BCE0043: Unexpected token: break. and BCE0043: Unexpected token: yield. "
var break : yield;
Thanks for your time
Answer by HolBol · Jul 18, 2014 at 09:00 PM
You don't need the 'f' there. Take it out. And you can't do var break : yield.
Yield isn't an accessible type. Make break a float and then use yield WaitForSeconds(break);
Your answer
Follow this Question
Related Questions
Changing Material In A Script? [Sorted] 1 Answer
Null values in Unity 1 Answer
How to fix code errors? 1 Answer
How to determine if my plane is facing downards (unityscript) 2 Answers