Operator '-' cannot be used with a left hand side of type 'Object' and a right hand side of type 'float'.

function UpdateMessages()
{
var dt = Time.deltaTime;
for( var t in times )
t -= dt;
while( times.length > 0 && times[0] < 0.0 ) {
times.Shift();
messages.Shift();
}
lastTime -= dt;
if( lastTime < 0.0 )
lastTime = 0.0;
}

Answer suppose similiar to this need to explicitly but I dont know how

Its just what it says. You cant subtract a float from an object. In the line the error ist reported you have something like this

    object o = new object();
    float f = 5.0;
	float e = 3.0;
    o -= f;  // won't work!
    // or like this
    e = o - f; // no go like this

What does “times” contain? it seems to be an array of something. I suspect its your line of code:

t -= dt;