What Errors!!!!

Hi, I'm pretty new to unity, but I've learned a good amount from online videos. What I'm wondering is that every time I fix all the listed errors about a 100 more re-appear. Is there a way to automatically fix all errors?


moved from answer

var updateInterval = 0.5;

private var accum = 0.0; // FPS accumulated over the interval
private var frames = 0; // Frames drawn over the interval 
private var timeleft : float; // Left time for current interval

function Start()
{
    if( !guiText )
    {
        print ("FramesPerSecond needs a GUIText component!");
        enabled = false;
        return;
    }
    timeleft = updateInterval;
}

function Update()
{
    timeleft -= Time.deltaTime;
    accum += Time.timeScale/Time.deltaTime;
    ++frames;

    // Interval ended - update GUI text and start new interval
    if( timeleft <= 0.0 )
    {
        // display two fractional digits (f2 format)
        guiText.text = "" + (accum/frames).ToString("f2");
        timeleft = updateInterval;
        accum = 0.0;
        frames = 0;
    }
}

Don't code errors in the first place? Other than that, no.

No - but, feel free to post your code on here and we will do our best to help and point you in the right direction.

This code is said to not read "Launcher

  1. var updateInterval = 0.5;

    private var accum = 0.0; // FPS accumulated over the interval private var frames = 0; // Frames drawn over the interval private var timeleft : float; // Left time for current interval

    function Start() { if( !guiText ) { print ("FramesPerSecond needs a GUIText component!"); enabled = false; return; } timeleft = updateInterval; }

    function Update() { timeleft -= Time.deltaTime; accum += Time.timeScale/Time.deltaTime; ++frames;

    // Interval ended - update GUI text and start new interval
    if( timeleft <= 0.0 )
    {
        // display two fractional digits (f2 format)
        guiText.text = "" + (accum/frames).ToString("f2");
        timeleft = updateInterval;
        accum = 0.0;
        frames = 0;
    } }
    
    

i would suggest to start the class from 0, to see if the code is the one with the error, and not other class, when you have lots of errors, most common cause, is a missing '}' or a ')', some of this things, also check for the ';', have fun coding