Hi, uh, I have this problem of BCE0044: expecting :, found ‘;’.
But I couldn’t find any problems with it, anyone help, please??..
function Update()
{if (Input.GetMouseButtonDown(1) && BulletsInClip >= 0 && Aim == 0);
{Aim();}}
Hi, uh, I have this problem of BCE0044: expecting :, found ‘;’.
But I couldn’t find any problems with it, anyone help, please??..
function Update()
{if (Input.GetMouseButtonDown(1) && BulletsInClip >= 0 && Aim == 0);
{Aim();}}
I Think this is why you have inserted a semi colon at the end of the codeline of if statements.
Your codeline will be:
function Update()
{if (Input.GetMouseButtonDown(1) && BulletsInClip >= 0 && Aim == 0)
{Aim();}}
Here’s a easier-on-the-eye indentation of your code.
function Update() {
if (Input.GetMouseButtonDown(1) &&
BulletsInClip >= 0 &&
Aim == 0) {
Aim();
}
}
remove the “;” after the last paranthesis of the “if” condition, i.e. “if” works like this:
if(someBoolean) {
print("someBoolean is true");
}
not
if(someBoolean); {
print("someBoolean is true");
}