Hey all, I’m trying to set up a game over script that will display a random string of text.
public void GameOver()
{
string[] dead = new List
{"gameover1",
"gameover2",
"gameover3",
"gameover4",
"gameover5"}
gameOverText.text = dead[Random.Range(0, dead.length)];
gameOver = true;
}
The issue is, when I go back to Unity, it tells me that there is a unexpected symbol “gameOverText”. I must be missing a typo or a command or something, because it worked fine before I tried to add the random aspect. Being such a nooblet, I don’t put it past myself to have missed something gigantic.