Help dubugging some beginner code

Hi All,

I need a little help as I am being driven crazy by the code below constantly coming up with errors CS1525, 0642 and 0116. Can anyone see something I cant? I am extremely new to all of this!!

Thanks in advance peeps


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

public class TextController : MonoBehaviour {

public Text text;

private enum States {cell, mirror, sheets_0, lock_0, cell_mirror, sheets_1, lock_1, freedom};
private States myState;

// Use this for initialization
void Start () {
	myState = States.cell;

// Update is called once per frame
void Update () {
	print (myState);
	if (myState == States.cell) {
	} else if (myState == States.sheets_0 {

void state_cell () {
	text.text = "You are in a prison cell, and you want to escape " +
				"some dirty sheets on the bed, a mirror on the wall and the door " +
				"is locked from the outside.

" +
“Press S to view Sheets, Press M to view Mirror or L to view Lock” ;
if (Input.GetKeyDown(KeyCode.S)){
myState = States.sheets_0;
void state_sheets_0 () {
text.text = "You can’t believe you sleep in these sheets, surely it’s time " +
"somebody changed them. The pleasure of prison life " +
"I guess!

" +
“Press R to Return to roaming your cell” ;
if (Input.GetKeyDown(KeyCode.R)){
myState = States.cell;


You forgot to close your parentheses :slight_smile:

Doh! Thanks for that, sometimes you just can’t see for looking!!!