This code is not working, anyone know why?

Hey there, my code is not working, please help me fix it. I double checked several times to see if i did anything wrong, but i didn’t find anything.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NumberWizard : MonoBehaviour {

	// Use this for initialization
	void Start (
        {
        int max = 1000;
        int min = 1;

        Debug.Log("Welcome to number wizard bro");
        Debug.Log("Pick a number, player1");
        Debug.Log("The number can be no higher than: " + max);
        Debug.Log("It can be no lower than: " + min);
        Debug.Log("Tell me if your number is higher or lower than 500");
        Debug.Log("Push up = higher, push down = lower, push enter = correct");
           }
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.UpArrow))
        { 
            Debug.Log("up Arrow was pressed.");
        }

        if (Input.GetKeyDown(KeyCode.DownArrow))
        { 
            Debug.Log("Down Arrow was pressed.");
        }

        if (Input.GetKeyDown(KeyCode.Return))
        {
            Debug.Log("Enter key was pressed.");
        }
        }
   }

On the declaration of the Start method there isn’t the closing parenthesis “)” for the parameters.

Just put “)” near the “(” and the problem is solved

2 Likes

Thank you so much.:grin:

3 Likes

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

Privacy & Terms