Trying to create a basic dialouge box (Newb)

I started learning C# today and I’m trying to wrap my head around variables and states by creating a speech bubble that you can click through. I’m getting no compiling errors and I don’t know how to make this work, any advice? :frowning:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class TextController : MonoBehaviour {

	public Text text;
	int message = 1 ;
	private enum States {message};
	private States myState;
	
	// Use this for initialization
	void Start () {
		myState = States.message;
	
	}
	
	// Update is called once per frame
	void Update () {
	if (myState == States.message) {
	state_message();
	
	if (Input.GetKeyDown(KeyCode.Return)) { ;
	message = + 1;

	}
	}
	}

	void state_message () {
		if(message==2)
			text.text = "My name is Fiona!" ;
		if(message==3)
			text.text = "How are you today?" ;
		}
	}

In cheking for input you have message = +1 - so message will be always “1”. The right shortcut is message += 1

Thanks Prastiwar now it’s working. :slight_smile: