Unexpected error, but I checked everything!

this is the code I made, and I checked and saw there is no semicolon missing, but it still tells me there is an unexpected error

// Use this for initialization
	void Start () {
		print ("welcome to Number Guesser!");
		print ("just  pick a number and don't tell me");

		int max = 1000;
		int min = 1;

		print ("the highest number you can pick is " + max);
		print ("and the lowest number you can pick is " + min);
		print ("is the number higher or lower than 500?");
		print ("up button = higher, down button = lower, and return = equal");
	
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKeyDown(KeyCode.UpArrow)){
		print("up arrow key is held down");
		}

		if (Input.GetKeyDown(KeyCode.DownArrow)) {
			print ("down arrow is held down");
		}

You might have just missed copying it from your code, but there is no closing brace for your Update method.

1 Like

Thank you it worked!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms