- Home /
Assets/Standard Assets (Mobile)/Example/ExampleScript.js/(13,104): BCE0044: expecting :, found ';'.
I am learning javascript currently and I simply don't understand this error. I have learned a great deal of javascript and Unity editing, but I have much to learn. Can you help me?
Assets/Standard Assets (Mobile)/zScripts/SummonEscape.js(13,104): BCE0044: expecting :, found ';'.
function Update()
{
if(Input.GetKeyDown("e"))
{
spawnBullet(grenade);
}
}
var grenade;
spawnBullet();
{
Instantiate(grenade, GameObject.Find("SummonEscape_Spawn").transform.position, Quaternion.identity);
grenade.rigidbody.AddForce(transform.forward*100);
yield WaitForSeconds(3);
Destroy(grenade);
}
I don't understand the error "Assets/Standard Assets (Mobile)/Example/ExampleScript.js/(13,104): BCE0044: expecting :, found ';'."
What do I need to do in order to fix it? I heard that I need to place || whenever I use an "If" function however there is only one If within my script and there is only one part to it. Do I need to place || even when I one have one topic within the "if" parenthesis?
Thanks for the help.
take the grenade out of the () on spawnBullet(); Sorry about that.
It isn't your fault. I just need to understand Javascript a little more. Thanks for the help.