This is my code and I’m getting this error:
Assets/NumberWizards.cs(27,4): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
On 27th line is print = ("Higher or Lower than " + guess);
not sure what to do with this one.
…
using UnityEngine;
using System.Collections;
public class NumberWizards : 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 lowest number you can pick it " + min);
print ("Is the number higher or lower than? " + guess);
print ("Up = higher, down = lower, return = equal");
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.UpArrow)) {
//print("Up arrow pressed");
min = guess;
guess = (min + max)/2;
print = ("Higher or Lower than " + guess);
} else if (Input.GetKeyDown(KeyCode.DownArrow)) {
print("Down arrow pressed");
} else if (Input.GetKeyDown(KeyCode.Return)) {
print("Down arrow pressed");
}
}
}