I get 4 Errors when running my script
Assets/Scripts/Shooting.js(17,47): BCE0043: Unexpected token: ).
Assets/Scripts/Shooting.js(17,48): BCE0044: expecting ), found ‘;’.
Assets/Scripts/Shooting.js(17,49): UCE0001: ‘;’ expected. Insert a semicolon at the end.
Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed.
I am pretty sure it is because unity 5 no longer supports the function networkview.IsMine, but when looking at Unity - Scripting API: NetworkView.isMine Only more errors appear when i try to use their method.
Can somebody tell me how to switch this over to unity 5? Thanks a ton, scripts below.
Line 17 = Shoot();
Variables
function Start () {
if(networkView.isMine)
Shoot();
}
function Update () {
weaponnum = gameObject.GetComponent(ChangeGun).weaponnum;
if(networkView.isMine){
if(Input.GetMouseButtonDown(1))
Prepare();
if(Input.GetMouseButtonUp(1))
ableshoot = false;
if(Input.GetMouseButtonDown(0) && ableshoot == true)
shooting = true;
if(Input.GetMouseButtonUp(0))
shooting = false;
if(ableshoot == false){
shooting = false;
}
}
}