CS1519 error -loading screen-

ive been getting the error
Assets/SplashScreenLoader.cs(8,13): error CS1519: Unexpected symbol `float’ in class, struct, or interface member declaration
when i make this loading screen script what do i do?
thanks :smile:

using UnityEngine;
using System.collections;

public class SplashScreenLoader : MonoBehaviour {
public float delayTime = 3;
public bool done = false

timer float;

void Start () {
timer = delayTime;

StartCoroutine( “SomeFunction” );
}

void Update () {

if( timer > 0 ) {
timer -= Time.deltaTime;
return;
}

if( done )
Application.LoadLevel( 1 );

}

IEnumerator SomeFunction() {
//Do something here

//some yeild opteration untill it has completed
yield return null;

//if the we did what we wanted and got it all done withour error
done = true;

}
}

is it a joke? where did you get this script?

If you read the error carefully you can see it says:

Assets/SplashScreenLoader.cs(8,13): error CS1519: Unexpected symbol `float' in class, struct, or interface member declaration

The numbers 8 and 13 (8,13) mean that the error is on line 8, character 13. If you count lines in your code you will end up here for line 8:

timer float;

The order of the type and variable name is wrong. You need to swap them : float timer;

What’s you should you get from my reply is that error messages are very useful, you should take time to read them to understand errors when they appear.

sorry im new to this thanks though :smile: