(6,9)Unexpected token: yield
(6,14)Insert a semicolon at the end.
.
#pragma strict
function Start () {
{
yield WaitForSeconds (3);
Application.LoadLevel ("MainMenu");
}
function Update ()
{
}
(6,9)Unexpected token: yield
(6,14)Insert a semicolon at the end.
.
#pragma strict
function Start () {
{
yield WaitForSeconds (3);
Application.LoadLevel ("MainMenu");
}
function Update ()
{
}
You have an extra curly brace. You can get rid of the one on line 3 or the one on line 5.
function Start () {
{
yield WaitForSeconds (3);
Application.LoadLevel ("MainMenu");
}
This would work, for example:
function Start ()
{
yield WaitForSeconds (3);
Application.LoadLevel ("MainMenu");
}
Each { in your program requires a corresponding } to close the code block.