Can't find error

Ive been going through line by line with the one provided in resourcs. I found some small errors like the { and ;. Im stuck now. Id appreciate an extra set of eyes.

// Use this for initialization
void Start()

{
    StartGame();
}

void StartGame()
{
    max = 1000;
    min = 1;
    guess = 500;

    Debug.Log("'Sup?! Welcome to Number Wizard");
    Debug.Log("Pick a number and don't tell me what it is.");
    Debug.Log("The highest number you can choose is: " + max);
    Debug.Log("and the lowest is: " + min);
    Debug.Log("Let's get started!");
    Debug.Log("Is your number higher or lower than: " + guess);
    Debug.Log("Push the Up Arrow for Higher, Down for Lower, or choose Enter if it's Correct");
    max = max + 1;
}
// Update is called once per frame
void Update()



    if (Input.GetKeyDown(KeyCode.UpArrow))
    {
        min = guess;
        NextGuess();
    }

    else if (Input.GetKeyDown(KeyCode.DownArrow))
    {
        max = guess;
        NextGuess();
    }

    else if (Input.GetKeyDown(KeyCode.Return))
    {
        Debug.Log("I'm a GENIUS!");
        StartGame();
    }
}
 Void NextGuess ()

{

guess = (max + min) / 2;
Debug.Log("Is it higher or lower than..." + guess);

}

// closing for class at top
}

Hi Shari,

Could you please format your code? And what error messages do you get? Do they refer to a specific line or character?


See also:

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms