I just started programming inside Unity, and I am trying to make a very basic countdown timer using a FOR loop. However, I don't undsertand why VS asks for a ; at the start of my loop
Here is the script :
public float startTime = 10;
void Start()
{
}
void Update()
{
for (startTime = 10; startTime > 0) // Unity says there should be a ; here //
{
startTime -= Time.deltaTime;
Debug.Log(startTime);
}
}
Error CS1002 : ";" requested at line 15.
I've verified in the scripting refernce, and there is never any ";" when starting a loop. Is this linked to a syntax error earlier in the code?