The name '...' does not exist in the current context [C#]

OK, so, basically, I want to fire a laser at a certain rate, sounds easy enough, right? Well, I’ve been using JS for a long time and want to switch over to C#, problem is, I’m getting this wonderful “The name ‘GameObjectVector3’ does not exist in the current context”. I’m not sure what to do, I’ve looked through other topics on this issue and don’t know how to solve it.

using UnityEngine;
using System.Collections;

public class Laser : MonoBehaviour {

	public GameObject LaserProjectile;
	private Vector3 GameObjectVector3;

	// Use this for initialization
	void Start () {
	
		InvokeRepeating("LaserShot", 0, 1);
	
	}

	// Update is called once per frame
	void Update () {

	}

	void LaserShot () {

		GameObjectVector3(gameObject.transform.position.x, gameObject.transform.position.y, gameObject.transform.position.z + 1);
		Instantiate(LaserProjectile, GameObjectVector3, gameObject.transform.rotation);
	
	}
}

The line should be:

  GameObjectVector3 = new Vector3(transform.position.x, transform.position.y, transform.position.z + 1);

The use of ‘gameObject.’ is optional. You code was trying to tread ‘GameObjectVector3’ as a method/function rather than a variable.

While this one was easy to figure out, for future posts it would be helpful if you pasted a copy of the error message from the console into your question.

using UnityEngine;
using System.Collections;

public class MouseFollow : MonoBehaviour {

// Use this for initialization
void Start () {
	
}

    // Update is called once per frame
	void Update () {
		
		//These two lines are all there is to the actual movement..
		float moveInput = Input.GetAxis("Horizontal") * Time.deltaTime *speed;
		transform.position += new Vector3(moveInput, 0, 0);
		//Restrict movement between two values
		if (transform.position.x <= -12f || transform.position.x >= 12f)
		{
			float xPos = Mathf.Clamp(transform.position.x, -12f, 12f); //Clamp between min -2.5 and max 2.5
			transform.position = new Vector3(xPos, transform.position.y, transform.position.z);

		}
}  } 

it says that speed doesn’t respond to the current context