Evaluating time.

In the piece of code I am writing, I am getting a large number of errors, a number of which I think stem from this piece of code. The variable types are probably incorrect, can anyone correct them please?

NB - the type of StatValue.downTime can be updated aswell.

edit - the error

Assets/Programming/Engines/StatsEngine/StatManager.cs(174,29):
error CS0019: Operator <' cannot be applied to operands of type UnityEngine.Time’ and `float’

public void inhibit(StatValue theStat,bool theState, int theTime)
{
	// modify stat based on prefered state
	if (theState != theStat.isEnabled)
	{
		// set to the preferance
		theStat.isEnabled = theState;
	}
	// modify the downtime if is further in the future than before
	if (theStat.downTime < (Time.time + theTime))
	{
		// set it to the new one
		theStat.downTime = Time.time + theTime;
	}
}

I believe your problem is the member “downTime” in whatever theStat object is.

If it’s not a number literal, it’s going to give you an operand error when you try to do numerical comparisons against it.
Check that class and ensure downTime is a number literal.