Please use real code tags for long code snippets, as explained here .
The error message for those errors is pretty clear about what’s wrong.
using UnityEngine;
public class Spawner : MonoBehaviour
{
public float clock = 0;
void Start()
{
}
void Update()
{
clock = clock + Time.deltaTime;
}
}
That’d be a valid snippet. Note that I renamed spawner to Spawner, as type names are usually written in PascalCasing.