Need help with error (92653)

Here is the error.

“MissingComponentException: There is no ‘NetworkView’ attached to the “npcmcrewvar3” game object, but a script is trying to access it.
You probably need to add a NetworkView to the game object “npcmcrewvar3”. Or your script needs to check if the component is attached before using it.”

	void Awake () { 
		gameObject.name = (networkView.isMine ? "Local" : "Remote") + "_Player";
		a.SetLayerWeight(1, 1);
		a.SetLayerWeight(2, 1);

		if(networkView.isMine){
			cInput = Utils.LoadInput();
			foreach (GameObject go in FindObjectsOfType(typeof (GameObject)))
				go.SendMessage("OnPlayerSpawn", gameObject, SendMessageOptions.DontRequireReceiver);
			moveDirection_current = transform.TransformDirection(Vector3.forward);
			
			networkView.RPC("AddOrReplaceWeapon", RPCMode.AllBuffered, (int)WeaponSystemSetup.Weapon_Slots.UNARMED, 0);
			networkView.RPC("AddOrReplaceWeapon", RPCMode.AllBuffered, (int)WeaponSystemSetup.Weapon_Slots.HANDGUN, 0);
			networkView.RPC("AddOrReplaceWeapon", RPCMode.AllBuffered, (int)WeaponSystemSetup.Weapon_Slots.RIFLE, 0);
			weapons.currentSlot = TryToSelectSlot(WeaponSystemSetup.Weapon_Slots.RIFLE);
		}

Does the object have a network view attached to it?

2 Answers

2

http://docs.unity3d.com/Documentation/Components/class-NetworkView.html
in the above link they explained clearly about network view .you forgot to add network view to the gameobject

youre putting it in the code…

networkView.isMine

soo…
its obvious. add a network view compomnent to the object with the script.

[20627-picture+20.png|20627]

Remember: every script you add to an object that has network.view code needs a network view component.

no probs if this has helped please mark as a correct answer, so that others can refer to this thread.