Hi,
In section 20, I received an error message saying parsing error. What did i do wrong?
using UnityEngine;
using System.Collections;
public class NumberWizard : MonoBehaviour {
// Use this for initialization
int max = 1000;
int min = 1;
int guess = 500;
void Start () {
print ("Welcome To Number Wizard");
print ("Pick A Number In Your Head, But Don't Tell Me!");
print ("The Highest Number You Can Pick Is " +max);
print ("The Highest Number You Can Pick Is " +min);
print ("Is The Number Higher Or Lower Then " +guess);
print ("Up = Higher, Down = Lower, Return = Equal");
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.UpArrow)) {
min = guess;
guess = (max + min) / 2;
print ("Higher or lower than " +guess);
}else if (Input.GetKeyDown(KeyCode.DownArrow)) {
print("Down Arrow Pressed");
max = guess;
guess = (max + min) / 2;
print ("Higher or lower than " +guess);
}else if (Input.GetKeyDown(KeyCode.Return)) {
print("I Won");
}
}