Help With Visual Studio

How can i check error found in my script using visual studio?
Is it just open the error list?
here’s the script which i got problem

using UnityEngine;
using System.Collections;

public class GunAimer : ExecutionOrderBehaviour {
	
	public Transform aimPivot;
	public Transform aimWeapon;
	public Transform aimTarget;
	public float effect = 1;
	
	private Vector3 aimDirection = Vector3.zero;
	private LayerMask mask;
	
	void Start () {
		// Add player's own layer to mask
		mask = 1 << gameObject.layer;
		// Add Igbore Raycast layer to mask
		mask |= 1 << LayerMask.NameToLayer("Ignore Raycast");
		// Invert mask
		mask = ~mask;
	}
	
	// Update is called once per frame
	public override void LateUpdateCustom () {
		
		if (effect <= 0)
			return;
		
		Vector3 origPos = aimWeapon.position;
		Quaternion origRot = aimWeapon.rotation;
		
		// Find pivot
		Vector3 pivot = aimPivot.position;
		
		Transform aimSpace = transform;
		
		// Find current aim direction in character space, prior to adjustment
		Vector3 pivotWeaponDirection = Quaternion.Inverse(aimSpace.rotation) * (aimWeapon.position - pivot);
		
		// Find desired aim direction in character space
		Vector3 pivotTargetDirection = Quaternion.Inverse(aimSpace.rotation) * (aimTarget.position - pivot);
		// Move direction smoothly
		pivotTargetDirection = aimDirection = Vector3.Slerp(aimDirection, pivotTargetDirection, 15*Time.deltaTime);
		
		// Get aiming rotation needed
		Quaternion rotation = Quaternion.FromToRotation(pivotWeaponDirection, pivotTargetDirection);
		
argetDirection;
		weaponDir.y = 0;
		targetDir.y = 0;
		float rotY = Vector3.Angle(weaponDir, 		RotateTransformAroundPointInOtherTransformSpace (aimWeapon, rotation, pivot, aimSpace));
		
		float distFraction = 0;
		
		// Calculates horizontal angle by projecting pivotWeaponDirection and
		// pivotTargetDirection on XZ plane and taking angle between them
		Vector3 weaponDir = pivotWeaponDirection;
        Vector3 targetDir = pivotTtargetDir; 
		
		// Calculate distFraction based on horizontal (XZ) rotation angle
		distFraction = 1 - (rotY / 400);
		
		aimWeapon.position = pivot + (aimWeapon.position - pivot) * distFraction;
				
		if (effect <= 1) {
			aimWeapon.position = Vector3.Lerp(origPos, aimWeapon.position, effect);
			aimWeapon.rotation = Quaternion.Slerp(origRot, aimWeapon.rotation, effect);
		}
	}
	
	void RotateTransformAroundPointInOtherTransformSpace (Transform toRotate, Quaternion rotation, Vector3 pivot, Transform space) {
		Vector3 pivotToWeapon = toRotate.position - pivot;
		
		Vector3 globalPositionDelta = - pivotToWeapon + space.rotation * (rotation * (Quaternion.Inverse(space.rotation) * pivotToWeapon));
		
		toRotate.position += globalPositionDelta;
		toRotate.rotation = space.rotation * rotation * Quaternion.Inverse(space.rotation) * toRotate.rotation;
	}
	
	void OnFire () {
		Vector3 dir = aimTarget.position-aimPivot.position;
		dir.Normalize();
		Ray ray = new Ray(aimPivot.position, dir);
		RaycastHit hit;
		if (Physics.Raycast(ray, out hit, 1000, mask)) {
			hit.transform.root.SendMessage("OnHit", new RayAndHit(ray, hit), SendMessageOptions.DontRequireReceiver);
		}
	}
}

Anyone know?

anyone pls hlp

look in console to see the problem, or compile using monodevelop.

you can set monodevelop as editor in the preferences of unity. monodevelop comes with the installation of unity (same directory)

In VS, just press “F6” to compile your project. If it has errors, you should see them in the “Error List” window, which is usually displayed just below the text editor panel. If you don’t see it, make sure it’s turned on by checking the “View | Error List” menu item.

Once you can see the errors, you can double-click them in the “Error List” panel and VS will take you to the offending code in the editor panel.

From there, just fix what you can, press F6 to recompile, and then lather, rinse, and repeat until everything works as expected.

By right in vs you would see the codes being underlined in red. And normally thats where you need to change. And i think i saw something wrong.

public float effect = 1.0f;

And may i ask does executionOrderBehaviour innherit from monobehaviour? If not you can’t use void Start(). Seems like a bit of confusion in your codes. It looks tough enough for a newbie c# user like me. And i think you know what you are doing but just perhaps some typo. I presume.

I’m willing to bet that’s what you need to fix. :wink:

Oh thx all
Thr is lots of problem…