- Home /
Question by
StarsideStudios · Sep 11, 2013 at 10:28 PM ·
error messagepublishingpublic variable
Assets/SplashScreen.cs(6,14): error CS1519: Unexpected symbol `public' in cl
This is my error: Assets/SplashScreen.cs(6,14): error CS1519: Unexpected symbol `public' in class, struct, or interface member declaration
This is my script:
using UnityEngine;
using System.Collections;
public class SplashScreen : MonoBehaviour {
public float timer = 2f
public string levelToLoad = "Level1";
// Use this for initialization
void Start() {
StartCoroutine("DisplayScene");
}
IEnumerator DisplayScene() {
yield return new WaitForSeconds( timer );
Application.LoadLevel( levelToLoad );
}
}
It is a C# script that changes my scene after 2 seconds. (It shows my logo then loads level #1). Please help..
Comment
Answer by meat5000 · Sep 11, 2013 at 10:28 PM
public float timer = 2f
needs a ; after it
public float timer = 2f;